Hi All,
I need to get past 30 days date as on current date (Date() - 30) i.e. (29/01/2013 - 30) should be 30/12/2012.
Could guide me to achieve this output in Javascript
Regards
Shehzad
Want to get past 30 days date as on current date
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 28, 2013, 5:32 PM EST
try following code, it might help you.
var numberOfDaysToAdd = -30;
var today = new Date();
today.setDate(today.getDate() + numberOfDaysToAdd);
in varible today you may get result date i.e. 30/12/2012
hope this will help you.
ShehzadRank #2,660 · 522 reputationPosted Jan 28, 2013, 6:33 PM EST