Hello ,
I am using flow to read my events and send me mail for upcoming events in my calendar.
Here i am getting the date correctly.
But when it comes to Time ,It does not show me the local time.
I want to display the time in my local time .
How can i format the datetime so that i can get time ????
Solved! Go to Solution.
Hi @abd3127,
You can indeed use the convertTimeZone function. The function works as follows: convertTimeZone(timestamp:string, sourceTimeZone:string,destinationTimeZone:string, format?:string).
I've just tested the below function:
convertTimeZone(utcnow(),'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm')
utcnow() was in this case "2017-11-24T13:15:44.4817469Z". The formatted date in my e-mail is as follows: "24/11/2017 14:15".
Here you can find a list of time zones: https://msdn.microsoft.com/en-us/library/gg154758.aspx.
If you want to format your string different you can use the following as a reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings.
Good luck!
Hey @ShawnKeeneTF
You need to go to the expressions tab and then under the date and time functions you get the function convertTimeZone
When you found the function you can fill it in with dynamic content or just type whatever you want in it.
When you are finished with filling in your expression you should have something like this
Hope this helps
Kind regards
Tom
If this reply has answered your question or solved your issue, please mark this question as answered.
Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Hi!
Microsoft Flow team recently released a bunch of Date related action blocks, one of them is called "Convert time zone". I haven't tested it myself yet, but it sounds promising.
You will find more info here:
https://flow.microsoft.com/en-us/blog/working-with-dates-and-times/
Hope this helps
Proud to be a Flownaut!
Hi @abd3127,
You can indeed use the convertTimeZone function. The function works as follows: convertTimeZone(timestamp:string, sourceTimeZone:string,destinationTimeZone:string, format?:string).
I've just tested the below function:
convertTimeZone(utcnow(),'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm')
utcnow() was in this case "2017-11-24T13:15:44.4817469Z". The formatted date in my e-mail is as follows: "24/11/2017 14:15".
Here you can find a list of time zones: https://msdn.microsoft.com/en-us/library/gg154758.aspx.
If you want to format your string different you can use the following as a reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings.
Good luck!
Thank you for advise, it worked like a charm 🙂 Can you please let me know how I can add AM/PM to the formated value. None of the combinations worked for me - 'yyyy-MM-dd hh:mm:ss a', 'yyyy-MM-dd hh:mm:ss AM/PM'. All throwing "he datetime string must match ISO 8601 format" error
Thank you,
Kirill
thank you very much, it worked like a charm
Where do I enter this code? Can I use it directly inline in the Flow Editor's "Start an Approval" action?
My problem is that I start a flow when a user adds an item to a SharePoint list. The SharePoint site regional settings/time zone is set to Central Time, but the email notice about the approval (from the Flow) uses a different time format. Here's an example:
I tried adding the Convert Timezone action block just before the "Start Approval" block, but how do I reference the converted time zone in the Approval block? Or does anything need to change and i just keep the approval block as-is?
Or, should I remove the Convert Timezone block, and just wrap the begindate/enddate parts of the Approval Details in the function like this?
Hey @ShawnKeeneTF
You need to go to the expressions tab and then under the date and time functions you get the function convertTimeZone
When you found the function you can fill it in with dynamic content or just type whatever you want in it.
When you are finished with filling in your expression you should have something like this
Hope this helps
Kind regards
Tom
If this reply has answered your question or solved your issue, please mark this question as answered.
Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks!
Hello,
I am using the automated flow "track your working hours in Excel Online (Business) spreadsheet."
I am happy to be able to set it up but the output I have for time is in UTC, how do i change it to a different time zone?
The expression in use currently is
formatDateTime(triggerOutputs()['headers']['x-ms-user-timestamp'],'hh:mm tt')
Thanks
User | Count |
---|---|
27 | |
16 | |
15 | |
12 | |
11 |
User | Count |
---|---|
43 | |
30 | |
28 | |
24 | |
23 |