Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

DATE

Description

The DATE data type is used to represent the year (yyyy), month (mm) and day (dd). Supported range is "01/01/0001" to "12/31/9999." The year can be omitted. If it is, the year value of the current system is specified automatically.

Output and input formats are as follows:

'mm/dd[/yyyy]'

'[yyyy-]mm-dd'

Remark
  • All fields must be entered as integer.
  • The date value is outputted in the format of 'MM/DD/YYYY' in CSQL, and it is outputted in the format of 'YYYY-MM-DD' in JDBC application programs and the CUBRID Manager.
  • The TO_DATE() function is used to convert a character string type into a DATE type. 
Example

DATE '2008-10-31' is stored as '10/31/2008'.

DATE '10/31' is stored as '10/31/2010'(if a value for year is omitted, the current year is automatically specified).

DATE '00-10-31' is stored as '10/31/2000'.

DATE '0000-10-31' is handled as an error (a year value should be at least 1).

DATE '70-10-31' is stored as '10/31/1970'.

DATE '0070-10-31' is stored as '10/31/0070'.