The DATE function converts a character
string to a DATE value. In the following query, the DATE function
converts a character string to a DATE value to allow for comparisons
with DATETIME values. The query retrieves DATETIME values only when call_dtime is
later than the specified DATE. Figure 1: Query
SELECT customer_num, call_dtime, res_dtime
FROM cust_calls
WHERE call_dtime > DATE ('12/31/97');
The following query converts DATETIME values to DATE format
and displays the values, with labels, only when call_dtime is
greater than or equal to the specified date. Figure 3: Query
SELECT customer_num,
DATE (call_dtime) called,
DATE (res_dtime) resolved
FROM cust_calls
WHERE call_dtime >= DATE ('1/1/98');