Solved

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

Posted on 2004-10-06
4
1,209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

728 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