May 2005
Intermediate to advanced
352 pages
14h 39m
English
DATE( )
DATE(date)This function returns the date from a given string. This function is available as of Version 4.1.1 of MySQL.
SELECT appointment, DATE(appointment) FROM appointments WHERE client_id = '8639' LIMIT 1; +---------------------+-------------------+ | appointment | DATE(appointment) | +---------------------+-------------------+ | 2005-01-11 14:11:43 | 2005-01-11 | +---------------------+-------------------+
In this SQL statement, the value of
the appointment column, which is a
DATETIME type column, is shown first. The second
field is the date extracted by the function from the same column.
Read now
Unlock full access