Page 1 of 1

display date from database and format it with php

Posted: Fri Jun 28, 2002 1:29 pm
by siesmith
hi guys
:roll:
I wish to take the date(timestamp) from the database and display it on my web page in a more readable format.
instead of 2002-06-26
i wish to format it in php to: for example, wednesday 26th july 02

i used this code ".date("D M j y", $Row[Date])."
and this was the result

Thu Jan 1 70 Farnworth, Bolton, Lancs The Moses Gate
Thu Jan 1 70 South Shields The Office

please help

kind regards
sie

Posted: Fri Jun 28, 2002 4:10 pm
by sam

Posted: Fri Jun 28, 2002 4:14 pm
by martin
mysql can format for you:
select date_format(tablename.date,'%W-%D-%M-%Y') as formatdate