Re: Converting a unix timestamp to "d m y" state ?

From: Date: Wed, 13 Dec 2000 20:45:30 +0000
Subject: Re: Converting a unix timestamp to "d m y" state ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30161@lists.php.net to get a copy of this message
At 20:36 2000-12-13 +0000, Ade Smith wrote:
Does anyone know how to convert a unix timestamp to a readable format such as 1-9-2000 etc ?
Uh, it'd help to know what format the timestamp is in. If it is a standard unix epoch time (seconds since 01 JAN 1970), then the various PHP date functions inherently support it. For instance, if your example is d-m-y (I'm rather partion to YYYYMMDD myself), the following would display it in that format:
        print( date("j-n-Y", $timestamp) );
--- Please DO NOT carbon me on list replies. I'll get my copy from the list. Sean B. Straw / Professional Software Engineering Post Box 2395 / San Rafael, CA 94912-2395

« previous php.general (#30161) next »