cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cgallahu
New Member

Weekly Planner Incomplete Tasks - Changing DateTime Format

Hello, I am trying to create a flow that sends an email to all people assigned incomplete tasks in Planner. I used the template "Create a daily summary of Planner Tasks by Bucket" and changed things, like getting the user profile for assigned person.

 

I am experiencing issues changing the format of the DueDateTime to "dd-mm-yyyy". I am using "formatDateTime(items('Iterate_through_tasks')? ['dueDateTime'], "dd-mm-yyyy")" during the Apply to each step.

 

When I run the flow I get the error "Invalid Template... 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'."

 

Any help would be appreciated! 

 

 

2 REPLIES 2
cgallahu
New Member

thumbnail_image003.png

thumbnail_image001.jpg

Images for reference

thjeffri
Microsoft
Microsoft

Hi cgallahu,

 

When you are looking at the flow run, you will want to check the DueDateTime value for the current item.  Does it have any value at all?

 

Based on the error, it sounds like this particular task doesn't have a DueDateTime, which is causing the formatDateTime() function to error out.  You will likely need to add some logic that checks to make sure the DueDateTime has a value before trying to format it.

 

Tom

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (920)