function sql_to_unix_time($timeString)
        {
                return mktime(substr($timeString, 8,2), substr($timeString,
10,2), substr($timeString, 12,2),    
                substr($timeString, 4,2), substr($timeString, 6,2),
substr($timeString, 0,4));
        }


you can use the above function to convert your mysql time stamp to a unix
timestamp (how long ago was the epoch? ) and use php time related functions
(such as time() )to manipulate it however you want.
PS: The function is not mine.



-----Original Message-----
From: SED [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to convert '2001032018' -> '2001 03 20 18' ?
(Fomating Date)


Hi,

I'm trying to convert the timestamp '2001032018' into '2001 03 20 18' or an
Array which I can easily format. Do you remember any date or string function
I can use?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

------------------------------------------
Phone:       (+354) 4615501
Mobile:      (+354) 8960376
Fax:         (+354) 4615503
E-mail:      [EMAIL PROTECTED]
Homepage:    www.sed.is <- New Homepage!
------------------------------------------


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to