Current location: Hot Scripts Forums » Programming Languages » Perl » Convert timestamp to date with Date::Manip


Convert timestamp to date with Date::Manip

Reply
  #1 (permalink)  
Old 07-29-05, 04:47 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
Convert timestamp to date with Date::Manip

Have a unix timestamp stored in $date1 and use this code to format it:

$date = UnixDate(ParseDate($date1), '%d/%m/%y');

But it doesnt work as I dont think it recgonises its a timestamp! I am using the Date::Manip module, any help?
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #2 (permalink)  
Old 07-29-05, 05:54 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
problem solved!
for anyone whose interested the code is:

$date = UnixDate(ParseDate("epoch $date1"), '%d/%m/%y');
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
date problem - convert eg. '06' to 'jun' tallpaul858 PHP 3 04-16-05 06:39 PM
convert a date into an int Deadlock PHP 1 12-07-04 04:41 AM
js date franches JavaScript 1 11-25-04 08:42 AM
search form with date search newbieasp24 ASP 1 10-17-04 02:52 PM
Problem with date and form djavet PHP 3 05-02-04 12:37 AM


All times are GMT -5. The time now is 04:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.