Solved

how do i convert unix timestamp to mm/dd/yyyy format?

Posted on 2004-10-06
4
1,169 Views
Last Modified: 2008-03-17
how can i convert a unix timestamp to mm/dd/yyyy format in javascript?
0
Comment
Question by:skiboy825
  • 2
4 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 12244634
Hi skiboy825,

Didn't you ask this question already?
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21158791.html

Regards,
Zyloch
0
 
LVL 13

Accepted Solution

by:
StormyWaters earned 100 total points
ID: 12244678
No, that's the opposite.
This is timestamp -> date,
that is date -> timestamp.

Just do this:

var myDate = new Date(unixtimestamp * 1000);

then use the parseDate function available at:
http://intelligentshadeofblue.com/temp.php?file=code/unixdate.js&title=PHP%20Date%20format%20in%20Javascript&highlight=1

to convert it to any form you wish.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12244682
Oops, that's my fault lol
0
 

Author Comment

by:skiboy825
ID: 12244712
Thank you!
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question