cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Impactful Individual
Impactful Individual

Convert time zone date format

Hello.

I need to convert a time from NZST to UTC, but the date format is d/mm/yyyy and the Convert time zone function is picking the wrong part of the date as the day.

 

Capture.PNG

In this screen shot, the baseTime is 5/04/2019 2:46:15 AM - this is the 5th day of April. I'm converting to UTC so I want the output to be 4/4/2019 2:46:15 PM, not 5/3/2019 as it appears in the screen shot above.

 

I looked at all the available formatstrings, and none have the date format the british way around.

 

Is there a way of doing this without building the baseTime string with a series of complicated splits and concats from the original data?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @WillPage,

 

Please take a try to split the date time, and you could refer to link below to do it:

https://powerusers.microsoft.com/t5/Building-Flows/Flow-failing-when-converting-quot-dd-MM-yyyy-quot...

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

10 REPLIES 10
Memorable Member
Memorable Member

Hello @WillPage,

 

This is the biggest pain in the a.. of Flow. DateTime and working with it, especially when you are trying to deploy solution cross the world.

 

As far as I know, there is no simple way hot to transfer different notation of DateTime into the Flow one. You have to go throught first splits, middle splits and then to combine it again.

 

I highly siggest you to create Idea for it here - https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas.

P.

Super User
Super User

Hi @WillPage, have you tried using the Convert Time Zone action? 

ConvertTimeZone.jpg

 

Rob

Hi @WillPage

I guess you need to change your format string:

Capture.JPG

 

 

 

 

 

 

With your choice General pattern date/time, I get 1/21/2019 12:55 PM too. Try that format string, as it is in my printscreen, it shows me the result 21/01/2019 12:58:15.





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Memorable Member
Memorable Member

Hello @WillPage again,

 

My fault I missed this option in this action as described by @Dorul you can change formatstring to your datetime.

 

Big apologise.

Pavel

Impactful Individual
Impactful Individual

@vecerpaUnfortunately this does not work. It swaps the day and month around on the output only:

 

Capture

 

Impactful Individual
Impactful Individual

Further to this, if I set a date as the input that can't be interpreted incorrectly (e.g the day of the month > 12th), I see this:

Capture.PNG

Hi @WillPage,

 

You couldn't enter a date with type d/mm/yyyy in the flow, and the flow would always see the date with type m/dd/yyyy.

 

So please enter a date with type mm/dd/yyyy in the flow if you would like the flow could identify your date.

 

Best regards,

Alice

 

@v-yuazh-msftthat would be the obvious solution if I could control the input, but unfortunately I have to work with this date format.

Hi @WillPage,

 

Please take a try to split the date time, and you could refer to link below to do it:

https://powerusers.microsoft.com/t5/Building-Flows/Flow-failing-when-converting-quot-dd-MM-yyyy-quot...

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-yuazh-msft Thanks. I was hoping it wouldn't come to split and recombining them but it will work. I have asked a question in the other thread.

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,311)