cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

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
Highlighted
Super User III
Super User III

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
Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (8,679)