I am trying to convert \"July 24 2013\" to \"DD-MM-YYYY\" with javascript but I keep getting and error.
I am using new Date(\'July 24 2013\').format(\"DD-MM-YY
new Date(\'July 24 2013\').format(\"DD-MM-YY
I would highly advise using momentjs!
moment('July 24 2013').format("DD-MM-YYYY"); // => "24-07-2013"
Simple as that!