cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

How do I format the date in the standard template (Create a daily summary of Planner tasks by bucket)

Step 1Step 1Step 2Step 2Step 3Step 3Step 3 & 4Step 3 & 4Step 5 & 6Step 5 & 6Step 7 & 8Step 7 & 8Step 9 & 10Step 9 & 10Step 11 & 12Step 11 & 12Step 13, 14, 15Step 13, 14, 15Step 16Step 16

 

hello,

I am new to flow and I am using the standard template "Create a daily summary of planner tasks by bucket" I cannot figure out how to get the date to format to MM/dd/yyyy rather than the string that is coming over 2019-04-30T10:00:00Z.

 

I have tried all of the previous suggestions on this forum. Not sure if I am just not putting it in the right place. I also have 3 fields that I need to convert the time.

 

StartDate

DueDate

CompletedDate

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How do I format the date in the standard template (Create a daily summary of Planner tasks by bucket)

Hi @cmr579 ,

 

Please take a try with the following code, which will return blank if the item is empty, otherwise, return its exact date.

if(empty(items('Iterate_through_tasks')?['completedDateTime']),'',formatdatetime(items('Iterate_through_tasks')?['completedDateTime'],'MM/dd/yyyy'))

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: How do I format the date in the standard template (Create a daily summary of Planner tasks by bucket)

@cmr579 

Hi there, welcome!

 

Check out this thread and let us know if that helps.

 

-Ed-

Highlighted
Community Support
Community Support

Re: How do I format the date in the standard template (Create a daily summary of Planner tasks by bucket)

Hi @cmr579 ,

 

Do you want to format the StartDate, DueDate, CompletedDate to format of “MM/dd/yyyy”?

 

In the action Set TaskDetails variable, please set them separately with the following functions:

StartDate:

formatdatetime(items('Iterate_through_tasks')?['startDateTime'],'MM/dd/yyyy')

DueDate:

formatdatetime(items('Iterate_through_tasks')?['dueDateTime'],'MM/dd/yyyy')

CompletedDate:

formatdatetime(items('Iterate_through_tasks')?['completedDateTime'],'MM/dd/yyyy')

 

I have tested it on my side successfully.

1.PNG

 

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Regular Visitor

Re: How do I format the date in the standard template (Create a daily summary of Planner tasks by bucket)

I added the content that you provided and I think it brought me alot closer. However, it failed because I do have some values which are null meaning they may not have start dates, due dates or completed dates. Do you have a recommendation to write to include strings that have no dates?

 

I am attaching the error message I received. action item 11.JPG

Highlighted
Community Support
Community Support

Re: How do I format the date in the standard template (Create a daily summary of Planner tasks by bucket)

Hi @cmr579 ,

 

Please take a try with the following code, which will return blank if the item is empty, otherwise, return its exact date.

if(empty(items('Iterate_through_tasks')?['completedDateTime']),'',formatdatetime(items('Iterate_through_tasks')?['completedDateTime'],'MM/dd/yyyy'))

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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
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.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,492)