cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

MS Planner flow time format

Hey there, 

 

Need a bit of help, i am getting the Start date/time and due date/time for a MS Planner task to email but the output format shows yyyy-MM-ddTHH:mm:ssZ. 

 

items('Iterate_through_tasks')?['startDateTime']

items('Iterate_through_tasks')?['dueDateTime']

 

Trying to get this to show dd-MM-yyyy only without the time, appreciate any help

 

Thanks,

 

 

J

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

 

Could you provide a full screenshot of the Flow configuration?

 

The first parameter of FormatDateTime() should be set according to the actual situation, your previous post mentioned that you can get the time through "items('Iterate_through_tasks')?['startDateTime']", so I gave that example.

 

It seems that you want to use Search for users to get the information about the people involved in Assigned to, I recommend you use Get user profile (V2) action.

 

If your configuration is similar to the screenshot below, please refer to the Expression below to configure formatDateTime() function.

 

formatDateTime(triggerBody()?['dueDateTime'],'dd-MM-yyyy')

 

27.PNG

 

It should be noted that StartDate cannot be configured here, because we can only set Due Date when creating a new task. Start Date is set after editing, so when a new task is added and Flow is triggered, In fact, Start Date may be empty, as below:

26.PNG28.PNG

25.PNG

 

If not, please provide more details, we would provide proper workaround for you.

 

Best Regards,

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-bacao-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could format the time using formatDateTime() function.

Like:

formatDateTime(items('Iterate_through_tasks')?['startDateTime'],'dd-MM-yyyy')

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hey, 

 

Thanks for the response getting an error with that - Pics:

 

ActionFailed. An action failed. No dependent actions succeeded.

and

InvalidTemplate. Unable to process template language expressions in action 'Set_TaskDetails_variable' inputs at line '1' and column '2603': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

 

 

 

Hi @Anonymous ,

 

Could you provide a full screenshot of the Flow configuration?

 

The first parameter of FormatDateTime() should be set according to the actual situation, your previous post mentioned that you can get the time through "items('Iterate_through_tasks')?['startDateTime']", so I gave that example.

 

It seems that you want to use Search for users to get the information about the people involved in Assigned to, I recommend you use Get user profile (V2) action.

 

If your configuration is similar to the screenshot below, please refer to the Expression below to configure formatDateTime() function.

 

formatDateTime(triggerBody()?['dueDateTime'],'dd-MM-yyyy')

 

27.PNG

 

It should be noted that StartDate cannot be configured here, because we can only set Due Date when creating a new task. Start Date is set after editing, so when a new task is added and Flow is triggered, In fact, Start Date may be empty, as below:

26.PNG28.PNG

25.PNG

 

If not, please provide more details, we would provide proper workaround for you.

 

Best Regards,

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,523)