From dd-mm-yyyy TO yyyy-mm-dd On INSERT

Codes here !

Moderators: macek, egami, gesf

Post Reply
User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Post by Joan Garnet » Thu Feb 20, 2003 5:37 pm

You could use it to specify the format:
DATE_FORMAT
http://www.phpfreaks.com/mysqlref/3.php

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Post by Joan Garnet » Sun Feb 23, 2003 12:28 pm

Well,
you can't format the input of the DATE column type :(
but you could format the output using

Code: Select all

DATE_FORMAT(date,format) 

Also, as you suggested you can save it in the database as varchar and then give it the format.

bye!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests