Displaying Unix Timestamps as human readable dates / times?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux