Declarative Objectivity (DO) Language : Attribute Structures : Date-Time Attributes
Date-Time Attributes
Date-time attributes are attributes that can hold date, time, datetime (timestamp), or interval values.
   
Date-time Values
Logical Type
Settings
Options1
Quick Look
Date values
Date
 
finalized: Date
 
Time values
Time
 
timeIn: Time
 
Datetime values for local or UTC times
DateTime
 
Storage:
DateTime
timestamp: DateTime
 
timestamp: DateTime {
  Storage: DateTime
}
 
Datetime values with time zone offsets
DateTime
 
Storage:
DateTimeOffset
easternTime: DateTime {
  Storage: DateTimeOffset
}
Interval values
Interval
deltaTime: Interval
 
1. You can omit settings for default options, which are indicated in boldface.
Discussion 
For general syntax information, see About Attribute Structures.
For examples of date-time values, see Date-Time Tokens.
For details such as the size, range, and resolution of date-time values, see Value Range and Resolution.
Specifying the Attribute Type
A date-time attribute has one of the following logical types:
 
Logical Type
Description
Date
Dates on the Gregorian calendar. All dates are Anno Domini (Common Era).
Time
Times in the 24-hour clock format.
DateTime
Datetimes (or timestamps) that combine a date component with a time component, expressed in the local time standard, the Coordinated Universal Time (UTC) standard, or as a local time in some time zone that is offset from UTC.
Interval
Timespans (or durations) between two dates, times or datetimes.
Specifying Type Characteristics
A date-time attribute uses the following settings to specify detailed type characteristics: 
Setting
Specifies
Options
Storage:
The amount of space reserved for time zone information in DateTime values
DateTime
For datetimes expressed in the local time standard or the Coordinated Universal Time (UTC) standard.
DateTimeOffset
For datetimes that include a time zone expressed as a UTC offset (number of hours and minutes between local time and UTC).
Value Range and Resolution
Values of a date-time attribute are stored in a general-purpose representation that has sufficient range and resolution for most applications, and a compact storage size.
 
Logical Type
Storage
Size in Bytes
Minimum Value
Maximum Value
Resolution
Date
4
1/1/0001
12/31/9999
1 day
Time
4
00:00:00.0000 (midnight)
23:59:59.9999
100 microseconds
DateTime
DateTime
8
1/1/0001
00:00:00.0000000
12/31/9999
23:59:59.9999999
100 nanoseconds
DateTimeOffset
16
Interval
8
-5,000,000 days
+5,000,000 days
100 nanoseconds