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