Iam trying to convert the format of date from dd-MM-yyyy into yyyy-MM-dd using date.js java script libray .. for that I used following code
var myDate = Date.parse("15-09-2014");
DateFormat = myDate.toString('yyyy-MM-dd');
alert(DateFormat );
so when alerting DateFormat i got the correct output as 2014-09-15 . But when i am trying to format a date in which the day is below 13 , i got the output in which the day and date positions interchanged...
for example when i give input as "12-09-2014", i got the result as 2014-12-09....but am expecting 2014-09-12...
Can anybody help me please...?