Question: how to convert mm/dd/yyyy to dd/mm/yyyy in javascript?
Answer: 12 Answers var date = "24/09/1977"; var datearray = date. split("/"); var newdate = datearray[1] + '/' + datearray[0] + '/' + datearray[2]; newdate will contain 09/24/1977. The split method will split the string wherever it finds a "/", so if the date string was "24/9/1977", it would still work and return 9/24/1977.