javascript - Date formatting -


using following:

var date = new date(parseint(jsondate.substr(6))); 

i get:

mon feb 22 1993 00:00:00 gmt+0000 (gmt standard time) 

how format too

22-02-1993 

?

you use getfullyear, getmonth (note values start 0), , getdate functions on date instance, assemble string. (those links specification, can hard read; mdc bit better.)

or use library datejs (although hasn't been maintained in quite time) or joidegn mentions, moment.js.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -