Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to derive yesterday's date using now expression

avatar
Contributor

Currently i am using ${now():format("yyyyMMdd")} to extract today's date and passing it to next flow. But i would need Yesterday's and day before's date also in similar way. How can i achieve this.

Appreciate quick response on this.

1 ACCEPTED SOLUTION

avatar
Super Guru

@Gubbi   The solution here is a now minute 24 hours:

 

Yesterday:

 

${now():minus(86400000):format('MM-dd-yyyy hh:mm:ss') }

 

Day Before Yesterday:

 

${now():minus(86400000):minus(86400000):format('MM-dd-yyyy hh:mm:ss') }

View solution in original post

1 REPLY 1

avatar
Super Guru

@Gubbi   The solution here is a now minute 24 hours:

 

Yesterday:

 

${now():minus(86400000):format('MM-dd-yyyy hh:mm:ss') }

 

Day Before Yesterday:

 

${now():minus(86400000):minus(86400000):format('MM-dd-yyyy hh:mm:ss') }