Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-10-06
4
Medium Priority
?
1,227 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 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

618 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