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 II
Super User II

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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (88,249)