Notifications
Announcements
Hello,
here is my problem, how to change the format of a date in the "Start Time" & "End Time" dynamic content added to an email?
This so that the format is correctly readable by the person who receives the mail?
@Igerarts you can use below expression to format date and time. Use this expression in the Dynamic content -> Expressions. Replace <Start Time> by selecting the Start Time value from Dynamic Content in the expression.
formatDateTime(<Start Time>, 'M/dd/yyyy h:mm tt')
@annajhaveri thanx for help,
tried this
formatDateTime(items('Appliquer_à_chacun')?['start/Date'],'dd/MM/yyyy')
but return me an error
@Igerarts can you please share what error are you facing?
So no error in the expression for the 2 expressions
formatDateTime(items('Appliquer_à_chacun')?['start/Date'],'dd/MM/yyyy') formatDateTime(items('Appliquer_à_chacun')?['end/Date'],'dd/MM/yyyy')
but after testing got
beforeafter
@Igerarts not able to see exact error, do you see any errors on right side of the flow run screen?
Here's it
InvalidTemplate. Unable to process template language expressions in action 'Envoyer_un_e-mail_à_partir_d’une_boîte_aux_lettres_partagée_(V2)_2' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
@annajhaveri
found it
formatDateTime(items('Appliquer_à_chacun')?['start'],'dd/MM/yyyy')
I have specified start/date when it failed, try just with start (as the original value for 'items') and it work.
ths for time and help
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
trice602 398 Super User 2025 Season 2
David_MA 331 Super User 2025 Season 2
Expiscornovus 203 Most Valuable Professional