Michan Posted December 3, 2006 Share Posted December 3, 2006 Hi there,I'd like to convert a timestamp in the format of [b]0000-00-00 00:00:00[/b] to a readable date/time.So for example, "2006-12-03 15:24:13" would become "12.03.2006 3:24:13 PM (PST)".I realised the timestamp needs to be converted, but I can't seem to get my head around it. If anyone could help me out I'd be very appreciative. I'm sure it's actually relatively simple.Many thanks,- Mi Link to comment https://forums.phpfreaks.com/topic/29342-making-0000-00-00-000000-timestamps-readable/ Share on other sites More sharing options...
jarcoal Posted December 3, 2006 Share Posted December 3, 2006 http://www.w3schools.com/php/php_date.aspthat what you're looking for? Link to comment https://forums.phpfreaks.com/topic/29342-making-0000-00-00-000000-timestamps-readable/#findComment-134545 Share on other sites More sharing options...
keeB Posted December 3, 2006 Share Posted December 3, 2006 use Date and mktime functions.[code]<?php$a = date("M.d.YY h:m:s", mktime($timestamp)) // $timestamp being your timestamp in bold, and the date parameters will vary, i'm sure (i havent tested them, completely made up :)?>[/code] Link to comment https://forums.phpfreaks.com/topic/29342-making-0000-00-00-000000-timestamps-readable/#findComment-134547 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.