cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kamel
Level: Powered On

Formatting Date And time in MS Flow

I am running into a problem when trying to get the date/time out of a column. I need it to display what is in the column and cant figure out how to format it in Flows. Attached is the issue and my flow. I need it to read the date/time in a mm/dd hh:mm AM/PM. any help will be greatly appreciated!

Flow 2.PNGFlow 1.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Formatting Date And time in MS Flow

@Kamel- give this a try:

 

I used this format ina an expression:

formatDateTime(utcNow(),'MM/dd hh:mm tt')
 
Which produced a date/time string that looks like this:
07/20 08:08 PM
 
DateFormat.jpg
 
If this works for you, please mark you Post as Solved.
 
Scott

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

jaylou
Level 8

Re: Formatting Date And time in MS Flow

HI Kamel,

If you are still having an issue with formatting the date, have you tried to use "Convert Timezone"?  I convert all dates before I send them in an alert.  There are many formating options for you to choose.

 

ConvertTimeAction.jpg

 

Hope this helps,

Joe

View solution in original post

12 REPLIES 12
Super User
Super User

Re: Formatting Date And time in MS Flow

@Kamel- give this a try:

 

I used this format ina an expression:

formatDateTime(utcNow(),'MM/dd hh:mm tt')
 
Which produced a date/time string that looks like this:
07/20 08:08 PM
 
DateFormat.jpg
 
If this works for you, please mark you Post as Solved.
 
Scott

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Kamel
Level: Powered On

Re: Formatting Date And time in MS Flow

Worked like a charm! Thank you so much!

Kamel
Level: Powered On

Re: Formatting Date And time in MS Flow

It worked once and then quit and went back to sending the way it was 😞

jaylou
Level 8

Re: Formatting Date And time in MS Flow

HI Kamel,

If you are still having an issue with formatting the date, have you tried to use "Convert Timezone"?  I convert all dates before I send them in an alert.  There are many formating options for you to choose.

 

ConvertTimeAction.jpg

 

Hope this helps,

Joe

View solution in original post

magalygreyes
Level: Powered On

Formatting Date And time in MS Flow

Greetings

 

I tried this :

formatDateTime(utcNow(), 'MM/dd hh:mm:tt')

 

To update dates and times for Form submited for approval , however it shows todays's date and I am trying to show the dates from the form submitted , how can I format this dates so it shows the right format when email is received for approval ?

Approval email example vs form submitted

 

 

Highlighted
Boneckrh19
Level 8

Re: Formatting Date And time in MS Flow

formatDateTime( [your date here] , 'MM/dd hh:mm:tt')

fatimat
Level: Powered On

Re: Formatting Date And time in MS Flow

I'm building a flow that would notify certain users when dates are changed. I did the following:
1. I created 2 hidden fields: Old Start date and Old End date (Date and Time fields in Sharepoint Events List).
2. In my flow, I convert all four fields (Old and New Start dates and End Dates) from UTC to NZST with format mm/d/yyyy h:mm AM/PM.
3. I check:
   A. New and Old Start dates are equal, and
   B. New and Old End Dates are equal
If false, Sharepoint sends an email to users that these dates have been changed.
4. The item is updated to populate the Old Start and End dates with the values from the New Start and End dates.

 

My problem is whether I use the New or the converted values to update the Old value fields, the values returned to Sharepoint turn out differently from the unconverted values.

Is there any way to fix this?

magalygreyes
Level: Powered On

Re: Formatting Date And time in MS Flow

convert time zone .jpg

 

This is how I fixed time zone in my flow .

1. Started my flow  with the action, in this case is when an item is created in sharepoint list ,

2. I added Convert time zone action after one for the start date and another for the End time

Here is how it looks

 

 

fatimat
Level: Powered On

Re: Formatting Date And time in MS Flow

Thanks, but strangely, it's working now. 

 

I removed all the conversions and just used the fields themselves. I think there's just a delay in displaying the changes to the Old and New Start dates in Sharepoint. And I think the only mistake I had in the first place was having "Date and Time" format for the New dates, and the "Date only" format for the Old Dates. After aligning those formats, I started adding the conversions and other stuff in it and the delay didn't help either. 

ProNewbie
Level: Powered On

Re: Formatting Date And time in MS Flow

I'm using the Convert Time Zone action but it does translate the days names from my language to english automatically.........

jeraldaustero
Level: Power Up

Re: Formatting Date And time in MS Flow

How to get week number?

CarlHRVA
Level: Powered On

Re: Formatting Date And time in MS Flow

This is the trick!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,719)