Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1464 How do I convert the number of milliseconds since January 1, 1970, 00:00:00 into its corresponding date (dd/mm/yy format)?

irt.org | Knowledge Base | JavaScript | Date | Q1464 [ previous next ]

Q1464 How do I convert the number of milliseconds since January 1, 1970, 00:00:00 into its corresponding date (dd/mm/yy format)?

Try:

<script language="JavaScript"><!--
var aDate = 925241310748; // miliseconds Since 1970;

theDate = new Date(aDate);
dd = theDate.getDate();
mm = theDate.getMonth()+1; // 0 based
yy = theDate.getYear();
if (yy < 1000) yy +=1900; // Y2K fix

alert (dd+'/'+mm+'/'+yy);
//--></script>

Feedback on 'Q1464 How do I convert the number of milliseconds since January 1, 1970, 00:00:00 into its corresponding date (dd/mm/yy format)?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.