开发者

How to display the date and time with PHP and MySQL?

开发者 https://www.devze.com 2022-12-11 17:11 出处:网络
Okay I kind of know how to display the time with PHP and My开发者_StackOverflow社区SQL but I need a little help.

Okay I kind of know how to display the time with PHP and My开发者_StackOverflow社区SQL but I need a little help.

I want to display the time something like this in the example below.

August 5, 2010 @ 8:47:28 PM

Here is the code I have so far that is listed below.

date('F j, Y', strtotime($date_created))


Did you use the chart at http://www.php.net/manual/en/function.date.php to see which characters you need for hour/minute/seconds and AM/PM? For the @ you just hardcode it in.

date('F j, Y @ g:i:s A', $whatever);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号