I have a value like the following Sun May 31 23:59:00 EDT 2015 and i want to convert this to 31/05/2015
How to convert this using javascript Date?
I have a value like the following Sun May 31 23:59:00 EDT 2015 and i want to convert this to 31/05/2015
How to convert this using javascript Date?
var d = new Date("Sun May 31 23:59:00 EDT 2015");
var f_date = d.getDate();
var f_month = d.getMonth()+1;
var f_year = d.getFullYear();
new_string=f_date+"/"+f_month+"/"+f_year;
added 1 into month( as it starts from 0) New_string is date in required format
Note- it will be given according to local timezone