cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rajraghwani
Regular Visitor

FormatDateTime

Good afternoon.

 

I'm quite new to Automate and would greatly appreciate some assistance.

 

Essentially, what i am trying to do is to send out an email to my colleagues detailing calendar events for the working week (Mon-Fri).

 

I have made some progress, however, the date and time format is output as follows:

 

rajraghwani_0-1627913426252.png

 

I would like to format the date to be shown as dd-mm-yyyy hh:mm

 

I've tried myself, however, am encountering errors when testing the flow. Below is the screenshot of the intended flow:

 

rajraghwani_1-1627913580274.png

 

Any help appreciated.

 

Kind regards,

 

3 REPLIES 3
PrasadAthalye
Community Champion
Community Champion

Please refer the format below.  Please ensure to replace correct expression for EventStart. 

 

formatDateTime(item()?['EventStart'],'yyyy-MM-ddTHH:mm:ss')

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
ScottShearer
Super User
Super User

@rajraghwani 

It's hard to tell from your screen shot, but try using the formatDateTime() expression in your Select rather than where you have it - you'll use a formatDateTime() for both the start and end times.

 

 

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

Scott
Powerplatform01
Post Patron
Post Patron

@rajraghwani 

You have to use 

formatDateTime('2009-06-15T13:45:30', 'M/dd/yyyy h:mm tt')

In first part you have to pass your date value and in second parameter you have to pass the format

 

Also request you to please watch this video and also please subscribe this channel please.

https://youtu.be/NLEMPn-T3ns

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,528)