![]() |
PHP Question
Hi,
How can I convert a mysql timestamp into a date: for example: I have 20020308205258 in my date field and want to convert that to 08-09-2002 ? Thanks in advance! DynaMite |
$date="20020308205258";
$date=ERegI_Replace("(^[0-9]{4})([0-9]{2})([0-9]{2})","\\3-\\2-\\1",$date); would do the job, I didnt test it . It was just born in my drunk mind :stoned |
Thank you very much....!!!!
DynaMite |
you're welcome :)
a little modification: $date="20020308205258"; $date=ERegI_Replace("(^[0-9]{4})([0-9]{2})([0-9]{2}).*$","\\3-\\2-\\1",$date); |
I noticed that....had already been fixed :D
Thanks again very much appreciated! DynaMite |
| All times are GMT -7. The time now is 12:43 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123