Sql problem with dates
Posted 23 March 2006 - 10:05 PM
Posted 24 March 2006 - 04:39 AM
Could you please explain why you're trying to use the DATETIME type if you only want the date? The following piece of code will give you the current date in the format that you asked..
SELECT date_format(CurDate(), '%d/%m/%y')Alternately, if you're trying to access a date from a table:
SELECT date_format(column, '%d/%m/%y') FROM tableSince you didn't really specify what you were trying to access / why, I'm afraid that's the best I can offer.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users