Re: [PHP-DB] formatting a timestamp

2003-06-02 Thread Gürhan Özen
Rick, Please give more information about your problem. Are you trying to format a timestamp field in a MySQL table? If yes, you can do something like, SELECT DATE_FORMAT( columnname, '%m-%d-%y : %T-%i' ); Hope this helps... Gurhan On Sat, 2003-05-31 at 01:38, Rick Dahl wrote: I want to print

[PHP-DB] formatting a timestamp

2003-05-31 Thread Rick Dahl
I want to print out a timestamp of length 14. I want to have it formatted like: mm-dd-yy : hh-mm I have looked but all I can find is how to format a date and I don't want that. I want the time also. Rick Don't burn the day...away ~ DJM

Re: [PHP-DB] formatting a timestamp

2003-05-31 Thread Rolf Brusletto
*This message was transferred with a trial version of CommuniGate(tm) Pro* Rick, You can use date() in the following fashion.. $timeStamp = time(); date('m-d-y : h-m', $timeStamp); where $timestamp is a unix epoch timestamp. Hope this helps! Rolf Brusletto http://www.phpexamples.net Rick Dahl