Forums
This topic is locked
datetime is not displaying correct
Posted 15 Aug 2003 00:20:26
1
has voted
15 Aug 2003 00:20:26 Bowen Chau posted:
Hello there, i am using Dreamweaver MX with PHP and MySQL. I am now creating a new message board. And I have used db_date as my datetime in my MySQL database. And then, I use a hidden field in Dreamweaver MX to set db_date as NOW() while I am inserting a new record to the database. However, the output is 2003-08-04 00:00:00. It cannot display the time. Does anyone knows what is going on? Thanks a lot. Replies
Replied 20 Aug 2003 08:06:35
20 Aug 2003 08:06:35 sennan lagaluga replied:
try using a different php date format, eg:
<pre id=code><font face=courier size=2 id=code>
php echo date ("l dS of F Y h:i:s A"
;
</font id=code></pre id=code>
will output it as: Wednesday 20th of August 2003 10:53:33 AM
<pre id=code><font face=courier size=2 id=code>
php echo date ("l dS of F Y h:i:s A"

</font id=code></pre id=code>
will output it as: Wednesday 20th of August 2003 10:53:33 AM