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

2 replies

Forum|alt.badge.img

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

Thanks for your support, it worked.