cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
orolamba210
Frequent Visitor

Reformatting date in planner tasks

I am using a public template to send a daily email of planner tasks and need to update the date formats. I have looked this up but can't figure out the best way to configure it.

 

I have tried to wrap an expression around the start date but it keep saying expressions was invalid. Maybe I am writing it wrong but the expression used was:

  • formatDateTime(items('Iterate_through_tasks')?['startDateTime'](),'dd/MM/yyyy tt')

 

I also tried to convert the time zone after setting the details but the flow failed:ifyes.jpg

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ChristianAbata 

 

I was actually trying to reformat the planner date that I already was receiving. I found another solution and used this to get around null values as well as reformat it:

 

if(equals(coalesce(items('Iterate_through_tasks')?['startDateTime'],'NULL'),'NULL'),'',formatdatetime(coalesce(items('Iterate_through_tasks')?['startDateTime'],'00/00/0000'),'MM/dd/yyyy h:mm tt'))

View solution in original post

2 REPLIES 2
ChristianAbata
Super User
Super User

hi @orolamba210  if you want to use the date into a planner task remember that you need to achive the correct format with Z at the end.

 

A correct format looks like this: 12/12/2020T00:00:00Z

you can try this

formatDateTime(items('Iterate_through_tasks')?['startDateTime'](),'yyyy-MM-ddTHH:mm:ssZ')

 

 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Hi @ChristianAbata 

 

I was actually trying to reformat the planner date that I already was receiving. I found another solution and used this to get around null values as well as reformat it:

 

if(equals(coalesce(items('Iterate_through_tasks')?['startDateTime'],'NULL'),'NULL'),'',formatdatetime(coalesce(items('Iterate_through_tasks')?['startDateTime'],'00/00/0000'),'MM/dd/yyyy h:mm tt'))

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,854)