TO_DATE Function
The TO_DATE function converts a character string to a DATETIME value. The function evaluates the char_expression first argument as a date, according to the date format that the format_string second argument specifies, and returns the equivalent date.
If char_expression is NULL, then a NULL value is returned.
Any argument to the TO_DATE function must be of a built-in data type.
If you omit the format_string parameter, the TO_DATE function applies the default DATETIME format to the DATETIME value. The default DATETIME format is specified by the GL_DATETIME environment variable.
UPDATE tab1 SET begin_date = TO_DATE('Wednesday July 25, 2007 18:45', '%A %B %d, %Y %R');
The format_string parameter in this example tells the TO_DATE function how to format the converted character string in the begin_date column. For a table that shows the effect of each format symbol in this format string, see TO_CHAR Function.