• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1237
  • Last Modified:

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

how can i convert a unix timestamp to mm/dd/yyyy format in javascript?
0
skiboy825
Asked:
skiboy825
  • 2
1 Solution
 
ZylochCommented:
Hi skiboy825,

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

Regards,
Zyloch
0
 
StormyWatersCommented:
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
 
ZylochCommented:
Oops, that's my fault lol
0
 
skiboy825Author Commented:
Thank you!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now