Question: I want to convert dd/mm/yyyy to mm/dd/yyyy in javascript.

Answer: 
```
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.
```
date = "01/Feb/2010"
monthes = {"Jan": "01", "Feb": "02", "Mar": "03" ... }
date_ar = date.split(/\//)
day = date_ar[0]
year = date_ar[2]
month = monthes[date_ar[1]]
new_date = [month, day, year].join("/")

```