Sql problem with dates
Started by
prasharry2k5
, Mar 23 2006 10:05 PM
#1
Posted 23 March 2006 - 10:05 PM
#2
Posted 24 March 2006 - 04:39 AM
Hello prasharry2k5,
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..
- Dan
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.
- Dan
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users