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 | 



TIME

Description

The TIME data type is used to represent the hour (hh), minute (mm) and second (ss). Supported range is "00:00:00" to "23:59:59." Second can be omitted; if it is, 0 seconds is specified. Both 12-hour and 24-hour notations are allowed as an input format.

The input format of TIME is as follows:

'hh:mi [:ss] [am | pm]'

Remark
  • All items must be entered as integer.
  • AM/PM time notation is used to display time in the CSQL; while the 24-hour notation is used in the CUBRID Manager.
  • AM/PM can be specified in the 24-hour notation. An error occurs if the time specified does not follow the AM/PM format.
  • Every time value is stored in the 24-hour notation. db_time_decode, one of C API functions, is used to return a value in the 24-hour notation.
  • The TO_TIME() function is used to return a character string type into a TIME type.
Example

TIME '00:00:00’ is outputted as '12:00:00 AM'.

TIME '1:15' is regarded as '01:15:00 AM'.

TIME '13:15:45' is regarded as '01:15:45 PM'.

TIME '13:15:45 pm' is stored normally.

TIME '13:15:45 am' is an error (an input value does not match the AM/PM format).