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
You don't need any date-specific functions for this, it's just string manipulation:
var parts = fecha2.value.split('-'); var newdate = parts[1]+'-'+parts[2]+'-'+(parseInt(parts[0], 10)%100);