cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
navaidm
Helper II
Helper II

utcnow and add days returns minutes instead of months

Hi all I have a flow which looks at a date column in a share point list and if the date is 4 days from today it send out confirmation email to sertain user. However, it fails the condition everytime and for trouble shooting I sent the calaculated date and the column date to myself for 'false' and it turns out that flow send minute instead of months in 

formatDateTime(addDays(utcNow(),4),'yyyy,mm,dd')
i tried using capital MM and simply utcnow('yyyy,mm,dd') but the reult is always in minutes..Need help
2 ACCEPTED SOLUTIONS

Accepted Solutions
ScottShearer
Super User III
Super User III

@navaidm :

Try using 'yyyy-MM-dd' as your date format in your expression.

 

If this addresses your issue, please make your post as Solved.

If you like my solution, please give it a Thumbs Up.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

@navaidm :

 

I noticed that you has commas in your format - does your format look exactky like this:

'yyyy-MM-dd'

Please note the use of a dash (-) rather than a comma (,).

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

6 REPLIES 6
ScottShearer
Super User III
Super User III

@navaidm :

Try using 'yyyy-MM-dd' as your date format in your expression.

 

If this addresses your issue, please make your post as Solved.

If you like my solution, please give it a Thumbs Up.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

@ScottShearer  I tried MM and many other similar variations. Doesnt work


@navaidm :

 

I noticed that you has commas in your format - does your format look exactky like this:

'yyyy-MM-dd'

Please note the use of a dash (-) rather than a comma (,).

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

@ScottShearer  used

formatDateTime(addDays(utcNow(),4),'yyyy-MM-dd') Result 2019-03-24
utcNow('yyyy-MM-dd') , 2019-03-20
utcNow('yyyy-MMM-dd')  2019-Mar-20
 
 

@ScottShearer  Tnx a bundle Scott. I remember trying MM and dashes earlier but it didnt work, I think I may not have tried both at same time. This has solved the problem. Tnx again

@navaidm :

Glad to help!

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (74,963)