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.
Changing date formats
Moderator: General Moderators
-
davidjwest
- Forum Commoner
- Posts: 67
- Joined: Sat Nov 06, 2004 5:26 am
- Location: Leeds, Yorkshire, England
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia