You can retrieve dates and times from the database in one of the following ways:
Using any interface, as a string
Using ODBC, as a TIMESTAMP structure
Using embedded SQL, as a SQLDATETIME structure
When a date or time is retrieved as a string, it is retrieved in the format specified by the database options DATE_FORMAT, TIME_FORMAT and TIMESTAMP_FORMAT. For descriptions of these options, see SET OPTION statement in Reference: Statements and Options.
For information on functions dealing with dates and times, see “Date and time data types”. The following operators are allowed on dates: