简体   繁体   中英

How to show date-time format like : 12 July at 12:43

Current I have showed : 9 December 20:02 with format code php: the_date('j FG:i');

But I want add string "at" like : 12 July at 12:43

I am sorry, Class is correct. That did not provide the correct output. You can, however do something like this:

$date = explode(' ', date('d F g:i'));
$new_date = $date[0] . ' ' . $date[1] . ' at ' .  $date[2];
echo $new_date;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM