Book Contents

Book Index

Next Topic

Home

TIME

TIME consists of a time of day with or without a time zone.

Syntax

TIME [ (p) ] [ { WITH | WITHOUT } TIME ZONE ] | TIMETZ

[ AT TIME ZONE ]

Semantics

 

p

(precision) specifies the number of fractional digits retained in the seconds field. By default, there is no explicit bound on precision. The allowed range 0 to 6.

WITH TIME ZONE

specifies that valid values must include a time zone

WITHOUT TIME ZONE

specifies that valid values do not include a time zone (default). If a time zone is specified in the input it is silently ignored.

TIMETZ

is the same as TIME WITH TIME ZONE with no precision

Limits

Data Type

Low Value

High Value

Resolution

TIME [p]

00:00:00.00

23:59:59.99

1 MS / 14 digits

TIME [p] WITH TIME ZONE

00:00:00.00+12

23:59:59.99-12

1 ms / 14 digits

 

Example

Description

04:05:06.789

ISO 8601

04:05:06

ISO 8601

04:05

ISO 8601

040506

ISO 8601

04:05 AM

same as 04:05; AM does not affect value

04:05 PM

same as 16:05; input hour must be <= 12

04:05:06.789-8

ISO 8601

04:05:06-08:00

ISO 8601

04:05-08:00

ISO 8601

040506-08

ISO 8601

04:05:06 PST

time zone specified by name

In This Section

AT TIME ZONE