bladechob Posted September 5, 2007 Share Posted September 5, 2007 Hi, I'm looking for a bit of code/formulae to convert unix time stamp info into a conventional date format. I have a file that generates invoices from data requested from an sql table - trouble is it brings in the date as a timestamp. I'm looking for something I can plug into the php invoice file rather than altering the database. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/68020-converting-time-stamp-to-normal-date-function/ Share on other sites More sharing options...
Jessica Posted September 5, 2007 Share Posted September 5, 2007 http://php.net/date Quote Link to comment https://forums.phpfreaks.com/topic/68020-converting-time-stamp-to-normal-date-function/#findComment-341940 Share on other sites More sharing options...
jitesh Posted September 5, 2007 Share Posted September 5, 2007 <?php $unix_timestamp = mktime(); echo date("Y-m-d h:i:s",$unix_timestamp); ?> Quote Link to comment https://forums.phpfreaks.com/topic/68020-converting-time-stamp-to-normal-date-function/#findComment-341998 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.