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

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (12,461)