2. SQL Data Types : Literals : Date and Time Literals : Time Literals
 
Share this page                  
Time Literals
Literals of the ANSI time type have the following format:
TIME 'time_value'
time_value
Defines a time value in the format hh:mm:ss, optionally followed by .fff (fractions of seconds) and also optionally followed by ±hh:mm, the time zone offset.
Examples:
time '11:11:00'
time '18:05:23.425364'
time '5:23:00-5:00'
time '18:05:23.4253+08:00'
 
Time Format
Example
Description
TIME WITHOUT TIME ZONE
TIME '11:11:00'
A time value with no decimal precision
TIME WITHOUT TIME ZONE(6)
TIME '18:05:23.425364'
A time value with six places of decimal precision
TIME WITH TIME ZONE
TIME '05:23:00-5:00'
A time with time zone value with no decimal precision
TIME WITH TIME ZONE(4)
TIME '18:05:23.4253+08:00'
A time with time zone value with four places of decimal precision