I am trying to convert the date to yyyy-mm--dd this format.Here is my code .can anyone please tell me how to do?
var curr_date = new Date(date - i*86400000);
Output of the code is coming like this
Thu Jul 17 2014 10:37:44 GMT+0530 (India Standard Time)
but i need the output like year-mm-dd.
I am trying this also for year-mm-dd .this is working fine.
var date = new Date();
var date_format =(date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate());
but i want to convert
var curr_date = new Date(date - i*86400000);
to yyyy-mm--dd how to append var date_format and var curr_date