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

thumbnail_image003.png

thumbnail_image001.jpg

Images for reference

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (13,001)