I have this date, that I get from jquery
Wed Oct 30 2013 09:05:17 GMT-0800 (Hora estándar Pacífico (México))
that I get this function
I did like the following code:
function myDateFormatter ("pass your date here") {
var d = new Date(dateObject);
var day = d.getDate();
var month = d.getMonth() + 1;
var year = d.getFullYear();
if (day < 10) {
day = "0" + day;
}
if (month < 10) {
month = "0" + month;
}
var date = day + "/" + month + "/" + year;
return date;
};