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
Solved! Go to Solution.
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')
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:
If not, please provide more details, we would provide proper workaround for you.
Best Regards,
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,
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')
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:
If not, please provide more details, we would provide proper workaround for you.
Best Regards,
User | Count |
---|---|
88 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
121 | |
55 | |
37 | |
24 | |
21 |