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'))

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,041)