0

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

Thanks

1 Answer 1

1
$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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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