Page 1 of 1

Changing date formats

Posted: Wed Apr 13, 2005 3:00 am
by davidjwest
I have a MySQL table with the date in it in YYYY-MM-DD format and I want to display this is DD-MM-YYY format.

What would be the easiest/best way to do this?

Is there a command in MySQL which would let me change the format in the SELECT or can I change the format once I have the date using PHP?

Or would it be easiest to insert the date into the table in the right format in the first instance - in which case is there any special command needed when the table is created?

Thanks.

I've done some searching around and the only info I can find is about the date('d-m-Y'} function which doesn't really help me.

Posted: Wed Apr 13, 2005 3:56 am
by Chris Corbyn