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

Re: MS Planner flow time format

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
Highlighted
Community Support
Community Support

Re: MS Planner flow time format

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.
Highlighted
Anonymous
Not applicable

Re: MS Planner flow time format

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

 

 

 

Highlighted
Community Support
Community Support

Re: MS Planner flow time format

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

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Kudoed Authors
Users online (7,162)