Solved

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

Posted on 2004-10-06
4
1,144 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now