cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Solution Supplier
Solution Supplier

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
Highlighted
Community Support
Community Support

Re: Convert time zone 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

10 REPLIES 10
Highlighted
Power Participant
Power Participant

Re: Convert time zone date format

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.

Highlighted
Super User III
Super User III

Re: Convert time zone date format

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

ConvertTimeZone.jpg

 

Rob

Highlighted
Resolver III
Resolver III

Re: Convert time zone date format

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!





Highlighted
Power Participant
Power Participant

Re: Convert time zone date format

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

Highlighted
Solution Supplier
Solution Supplier

Re: Convert time zone date format

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

 

Capture

 

Highlighted
Solution Supplier
Solution Supplier

Re: Convert time zone date format

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

Highlighted
Community Support
Community Support

Re: Convert time zone date format

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

 

Highlighted
Solution Supplier
Solution Supplier

Re: Convert time zone date format

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

Highlighted
Community Support
Community Support

Re: Convert time zone 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

Highlighted
Solution Supplier
Solution Supplier

Re: Convert time zone date format

@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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,843)