PDA

Click to See Complete Forum and Search --> : How to convert date ?


AvisSoft
Sep 29th, 2004, 07:08 AM
Hello!

How to convert unix time stamp data to human read able date ?

For eg. I want to get 01-01-2004 from 1234567890. This is just an example how it looks.

Thanks!

ober0330
Sep 29th, 2004, 07:20 AM
use a combination of date and strtotime. mktime() would also be an option.

AvisSoft
Sep 29th, 2004, 07:24 AM
Hi!

Any sample would be highly appericiated.

Thanks!

ober0330
Sep 29th, 2004, 07:29 AM
Hi!

Don't be lazy, check the manual!

Thanks!

visualAd
Sep 29th, 2004, 07:31 AM
Look at the PHP date() (http://www.php.net/date) function. You supply it with a format string and UNIX timestamp.

The following would print the dat in this format: "29/09/2004 13:28"

echo(date('m/d/Y H:i', $timestamp));

AvisSoft
Sep 29th, 2004, 07:31 AM
Lol i am not lazy..i check the manual and atleast i did not found anything. :( my php editor comes with php manual...and i am unable to find anything :( that is why i posted here!

visualAd
Sep 29th, 2004, 07:32 AM
Originally posted by ober0330
Hi!

Don't be lazy, check the manual!

Thanks!
I even posted a link to help him. Now arn't I kind :D

AvisSoft
Sep 29th, 2004, 07:36 AM
Who's the kind one ? visualAd visualAd :thumb:

The Hobo
Sep 29th, 2004, 11:50 AM
Originally posted by AvisSoft
Lol i am not lazy..i check the manual and atleast i did not found anything. :( my php editor comes with php manual...and i am unable to find anything :( that is why i posted here!

Did you check the Date and Time Functions section?