Welcome Guest, Not a member yet? Register   Sign In
Display Date
#4

[eluser]clintonbeattie[/eluser]
Hi,

this is what I have. The first methos outputs the date as it is the the mySQL database, the second is trying to use the info you posted for me.

echo "<p>".date('Y-m-d', strtotime($post['post_date'])) ."</p>";

echo DATE_FORMAT('2006-05-00', '%Y:%m:%d');

The second attempt here displays this error...
Code:
A PHP Error was encountered

Severity: Warning

Message: date_format() expects parameter 1 to be DateTime, string given

Filename: views/blog.php

Line Number: 6

Any ideas? I'm baffled.


Messages In This Thread
Display Date - by El Forum - 03-17-2009, 05:54 AM
Display Date - by El Forum - 03-17-2009, 06:07 AM
Display Date - by El Forum - 03-17-2009, 06:42 AM
Display Date - by El Forum - 03-17-2009, 07:12 AM
Display Date - by El Forum - 03-17-2009, 07:14 AM
Display Date - by El Forum - 03-17-2009, 07:27 AM
Display Date - by El Forum - 03-17-2009, 08:50 AM
Display Date - by El Forum - 03-17-2009, 08:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB