How can the format 2011-09-24T00:00:00 be changed to DD/MM/YYYY using javascript?
Asked
Active
Viewed 103 times
0
-
Possible duplicate of http://stackoverflow.com/q/1056728. – Jonathan Lonowski Aug 06 '13 at 05:21
-
2Like this?: http://jsfiddle.net/wJ8Wb/ – Ian Aug 06 '13 at 05:23
-
1as long as the raw date format is a proper one, I think I will use regex too like @Ian's answer – Aug 06 '13 at 05:40
-
1to save few steps [http://jsfiddle.net/wJ8Wb/1/](http://jsfiddle.net/wJ8Wb/1/) – Aug 06 '13 at 05:45
-
@rps Nice update, I didn't think about using `.replace()` – Ian Aug 06 '13 at 15:29
1 Answers
2
try using this library Moment.js http://momentjs.com/
i use it and it does its work nicely

Parv Sharma
- 12,581
- 4
- 48
- 80