I have a date in a format like this fecha2.value = \'2014-01-06\', but I want to change the format to this \'01-06-14\' using jQuery.
fecha2.value = \'2014-01-06\'
\'01-06-14\'
How c
var d = new Date(); var curr_date = d.getDate(); var curr_month = d.getMonth(); var curr_year = d.getFullYear(); curr_year = curr_year.toString().substr(2,2); document.write(curr_date+"-"+curr_month+"-"+curr_year);
You can change this as your need..