开发者

How to store and display date in dd-mm-yy format in Joomla?

I am developing开发者_运维知识库 a component in Joomla. Through my component I want to store timestamp to "lastaccessed" field.

My problem is that, if I am simply storing the date, then MySQL is displaying it as "0000-00-00 00:00:00"

I am using the PHP date function like this:

$row->date_lastaccessed=date();

How can I store and retrieve the date in my format (dd-mm-yyyy hh:mm:ss ampm)?


Have you looked at:

http://php.net/manual/en/function.date.php

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜