Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » Types » Date and Time Types |
Type | Description |
DATE | A date value containing a year, month, and day. |
TIME | A time value containing an hour, minute, second, and millisecond. |
TIMESTAMP | A combined date and time value containing a year, month, and day along with an hour, minute, second, and millisecond. |
Format | Description |
DATE 'YYYY-MM-DD' | YYYY is the 4-digit year, MM is the 2-digit month (1-based), and DD is the 2-digit day (1-based). |
TIME 'HH:MM [:SS [.ZZZ AM/PM]]' | HH is the 2-digit hour (0-based), MM is the 2-digit minute (0-based), SS is the 2-digit second (0-based), ZZZ is the 3-digit millisecond, or fraction of a second, and AM/PM is the 12-hour time format specifier (as opposed to the default 24-hour time format). The SS, ZZZ, and AM/PM portions of times are optional. |
TIMESTAMP '<Date> <Time>' | Timestamp literals use the date and time formats with a space between them. |
-- This example specifies a date literal SELECT * FROM Orders WHERE OrderDate BETWEEN DATE '2006-01-01' AND DATE '2006-01-31' -- This example specifies a TIME literal -- using 24-hour format SELECT * FROM TimeClockEntries WHERE PunchInTime > TIME '16:00' -- This example specifies a TIME literal -- using 12-hour format SELECT * FROM TimeClockEntries WHERE PunchInTime > TIME '4:00 PM'
Deviation | Details |
TIME and TIMESTAMP Types | ElevateDB supports including the AM or PM (case-insensitive) indicator for indicating 12-hour time formats. |
TIME and TIMESTAMP Types | ElevateDB does not support specifying the precision of a time or timestamp value and always includes the millisecond portion. |
WITH TIME ZONE Types | ElevateDB does not support the time zone versions of the TIME and TIMESTAMP types. |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |