ChrisMartino Posted August 7, 2010 Share Posted August 7, 2010 Hello there, I was curious about PHP's 'time()', now is there any way to parse that into a human readable version e.g 7:53 PM, because I'm unsure on how to work with the time function since it's returned in the unix format, thanks again in advance for your help guys. Quote Link to comment https://forums.phpfreaks.com/topic/210065-how-to-parse-time-to-a-human-readable-format/ Share on other sites More sharing options...
wildteen88 Posted August 7, 2010 Share Posted August 7, 2010 Yes, pass the unix timestamp as the second argument to the date function. Using date() you can format the timestamp to your needs, eg $timestamp = time(); echo date('g:i A', $timestamp); Quote Link to comment https://forums.phpfreaks.com/topic/210065-how-to-parse-time-to-a-human-readable-format/#findComment-1096305 Share on other sites More sharing options...
ChrisMartino Posted August 7, 2010 Author Share Posted August 7, 2010 Thanks for your time for explaining worked perfectly, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/210065-how-to-parse-time-to-a-human-readable-format/#findComment-1096311 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.