User since 3 days and 4 hours.....??
swicks77 - April 10, 2007 - 23:21
I've been trying to track the dates that users have joined my community site. Administrator features enables me to see how long site users have been registered to my site in the format 'Member for 3 days and 4 hours'. While this is beneficial, I'm looking for the specific date that users registered to my site. E.g. 'Member since 3/6/07' It would save time to have the user information in the date format.
Anyone have an idea?
Thanks!

SQL and PHP to do it
It should be pretty easy. The time and date that the user account is created is recorded in the database. It's in the table "users", under the field "created", and it's in the Unix timestamp format. PHP deals with this format very well using the date function. You'll want to do something like the following (for all users):
$query = "SELECT created,name FROM {users}";$result = db_query($query);
while ($obj = db_fetch_object($result)) {
$timestamp = $obj->created;
$formatted_date = date("m/d/y", $timestamp);
print("User " . $obj->name . " has been a member since " . $formatted_date . ".");
}
I hope that helps.