I have a script to get all the fields from a database and print them to a page.. one of which is a date. Only problem is the date is printed like 2002-06-02 17:47:47. How do I format it to print Sunday 2nd June 2002 for example? I've tried:
$Date = odbc_result($Result, 2);
$ts = strtotime($Date);
$PostDate = date("l jS F Y", $ts);
print("$PostDate");
but this gives me Warning: unexpected error in date() in c:\program files\apache group\apache\htdocs\nc\news.php on line 37
Any help appreciated, thanx.