cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Adding Dates

I am currently using a manual button flow to add tasks to planner.  I'd like to be able to enter a single date and have logic determine other dates based on that one date (2 days before, 1 day after, etc).  I can do this in Excel but I cannot figure out how to do this in a flow...  Do you really have to know how to code to do such a basic function?  Other apps do it really easily so I feel like I must be missing something.

I also have a flow triggered by a calendar event and I have it post a message to Team and the message includes the date using the dynamic function.  The format that brings it in is not very helpful - how do I modify so it shows in the right time zone and in a way that others will know what it means?

 

I'm not adverse to learning some coding here, but I don't even know where the code should be entered...

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @Anonymous,

 

I'm afraid that so far in flow you need to use the Compose action and then use the adddays workflow functions specified here: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language.

 

If you are not fimilar with it, have a look at:

https://devspoint.wordpress.com/2017/04/12/using-workflow-definition-language-with-microsoft-flow/

https://powerusers.microsoft.com/t5/Building-Flows/Formatting-Date-List-Items-from-SharePoint-when-sending-an-E/m-p/32380/highlight/true#M2974

 

To force the timezone, you might need to nest the formatDateTime functions:

formatDateTime(concat(formatDateTime(mydate,'yyyy-MM-ddThh:mm:ss'),'-3:00'),'d/MM/yyyy hh:mm tt')

something like that.

 

Regards,

Mona

Community Support Team _ Mona Li
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

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @Anonymous,

 

I'm afraid that so far in flow you need to use the Compose action and then use the adddays workflow functions specified here: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language.

 

If you are not fimilar with it, have a look at:

https://devspoint.wordpress.com/2017/04/12/using-workflow-definition-language-with-microsoft-flow/

https://powerusers.microsoft.com/t5/Building-Flows/Formatting-Date-List-Items-from-SharePoint-when-sending-an-E/m-p/32380/highlight/true#M2974

 

To force the timezone, you might need to nest the formatDateTime functions:

formatDateTime(concat(formatDateTime(mydate,'yyyy-MM-ddThh:mm:ss'),'-3:00'),'d/MM/yyyy hh:mm tt')

something like that.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

The powerusers link you provided clued me in!  I was getting the error but hadn't see the part about copying what was after @ in the bracket back in place of the dynamic content link.  I am almost there - now I just have to work add days into it.

 

 

Thanks!!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (3,005)