2 Replies Latest reply: Aug 28, 2017 4:15 AM by Arghya Ray RSS

    How to get a date seven days before today's date?

    Arghya Ray

      Hello Everyone,


      I have today's date in the format say 'YYYY-MM-DD'. I want to get the date seven days before this date.


      eg. Suppose today's date is '2017-08-28'. So my requirement is to get the date value as '2017-08-21'.


      What I am doing to achieve this is:


      Let StartDate = Date(today(), 'YYYY-MM-DD');


      Let Required_Date=($(StartDate)-7);


      But this doesn't suffice my problem. Can anyone please help me out with any suggestion.


      Thanks and Regards,