Re: [PHP-DB] formatting a timestamp
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 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 > > _ > Add photos to your messages with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] formatting a timestamp
*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 wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* 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 _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php