WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Within my multisite installation I can get the registered and last updated time strings for a sub blog through get_blog_details and the blog ID:

echo get_blog_details($blog_ID)->registered

Ok, how do I format the resulting time string:

2011-09-28 00:20:34


share|improve this question
up vote 1 down vote accepted
$time = get_blog_details($blog_ID)->registered;
$unix_time = strtotime($time);

$my_time_format = date('Y-m-d H:i:s', $time);  // eg. 2011-09-28 00:20:34
$diff_format = human_time_diff($time);          // eg. 2 days

See date() and replace Y-m-d H:i:s with the format you want

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.