Displaying Unix Timestamps as human readable dates / times?

From: Date: Wed, 15 Feb 2006 14:22:45 +0000
Subject: Displaying Unix Timestamps as human readable dates / times?
Groups: php.db 
Request: Send a blank email to php-db+get-41260@lists.php.net to get a copy of this message
Hi there. I am currently intergrating a vbulletin forum with my website, and am now merging the two databases together. On the vbulletin database all times/dates are stored as a unix timestamp, but in the past I've always stored mine as 21/3/2006 (for example.) I am now trying to get these unix timestamps to display as dates / times on my website, but to no avail. Once I see how to get it working I think I should be ok, so if anyone can offer some assistance with this then it would be greatly appriciated. At the moment, I have a select clause --> <?php mysql_select_db($database_main, $main); $query_members = "SELECT userid, usergroupid, username, email, homepage, usertitle, joindate, lastvisit, posts, ipaddress, msn FROM user ORDER BY userid ASC"; $members = mysql_query($query_members, $main) or die(mysql_error()); $row_members = mysql_fetch_assoc($members); $totalRows_members = mysql_num_rows($members); ?> And then I am trying to get this date to display as a human readable date. --> <?php echo $row_members['joindate']; ?> Anyone have any ideas how? Many thanks.

« previous php.db (#41260) next »