Skip to main content
Solved

How to get yesterday date


Forum|alt.badge.img

hi Team, i need to get yesterday date in my workflow global variable, can you please help in getting.

when i use toString(now(),"yyyy-MM-dd") -- printed me todays date 

when i use toString(now() - 1 ,"yyyy-MM-dd"), getting error as operator “-” can not be used

Best answer by srija piratla

Hi @rajeswarimyla ,

tostring(todate((dateAdd(now(),-1,'DAY'))),'yyyy_mm_dd')  

Please find this expression to get the yesterdays date. Hope this helps.

Regards,

Srija Piratla

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img
  • Ataccamer
  • 49 replies
  • Answer
  • August 22, 2024

Hi @rajeswarimyla ,

tostring(todate((dateAdd(now(),-1,'DAY'))),'yyyy_mm_dd')  

Please find this expression to get the yesterdays date. Hope this helps.

Regards,

Srija Piratla


Forum|alt.badge.img
  • Author
  • Space Explorer
  • 4 replies
  • August 23, 2024

Thanks for your support, it worked.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings