Page 1 of 1

Date formatting problem

Posted: Thu Oct 07, 2004 12:40 pm
by Tourex
I know this must be a really easy one, but please bear with me as a total newbie.

I'm trying my first attempts with MySQL and PHP. I've defined a database table with the field UpdateDate defined as DATE. An entry for the 15 October 2004 shows correctly as 2004-10-15 when I select the table.

Now, I want to display that field as '15 Oct 2004' on my web page. It is defying my attempts to do so. I have tried the sql Date_Format function on the field in the Select command and got a blank output. When I extract the UpdateDate field from the row and try to use the php Date() command on it I get either blank output or rubbish dates.

Can anyone please help - in very simple code terms - and explain where I might be going wrong. This is driving me nuts.

Posted: Thu Oct 07, 2004 1:11 pm
by twigletmac
Could you post the SQL you've been trying so we can try and help you sort it :)

Mac

Posted: Thu Oct 07, 2004 4:32 pm
by feyd
[mysql_man]DATE_FORMAT[/mysql_man]()

Posted: Sat Oct 09, 2004 1:28 am
by m3mn0n
Some helpful research links:

[big_search]php mysql date[/big_search]