Welcome to Sign in | Help
in Search

DateTime Types Limits

Last post 11-23-2006, 12:50 PM by MrSmersh. 0 replies.
Sort Posts: Previous Next
  •  11-23-2006, 12:50 PM 995

    DateTime Types Limits

    Sapind prin helpul meu am dat de astea...
    Poate ajuta pe careva (da e o compilare a books online si alte surse etc... (C) etc Smile)

    SQL Server

    datetime

    Date and time data from January 1, 1753 through December 31, 9999, to an accuracy of one three-hundredth of a second (equivalent to 3.33 milliseconds or 0.00333 seconds). Values are rounded to increments of .000, .003, or .007 seconds, as shown in the table. Microsoft® SQL Server™ rejects all values it cannot recognize as dates between 1753 and 9999.

    smalldatetime

    Date and time data from January 1, 1900, through June 6, 2079, with accuracy to the minute. smalldatetime values with 29.998 seconds or lower are rounded down to the nearest minute; values with 29.999 seconds or higher are rounded up to the nearest minute.

    Oracle

    DatatypeDescriptionMax Size:Oracle 7Max Size:Oracle 8Max Size:Oracle 9Max Size: PL/SQL
    DATE Valid date rangefrom January 1, 4712 BC to December 31, 4712 AD.from January 1, 4712 BC to December 31, 9999 AD.from January 1, 4712 BC to December 31, 9999 AD.from January 1, 4712 BC to December 31, 9999 AD. (in Oracle7 = 4712 AD)

    DB2 AS400

    Date

    A date is a three-part value (year, month, and day) designating a point in time under the Gregorian calendar16, which is assumed to have been in effect from the year 1 A.D.

    The range of the year part is 0001 to 9999. The date formats *JUL, *MDY, *DMY, and *YMD can only represent dates in the range 1940 through 2039. The range of the month part is 1 to 12. The range of the day part is 1 to x, where x is 28, 29, 30, or 31, depending on the month and year.

    The internal representation of a date is a string of 4 bytes that contains an integer. The integer (called the Scaliger number) represents the date.

    The length of a DATE column as described in the SQLDA is 6, 8, or 10 bytes, depending on which format is used. These are the appropriate lengths for character-string representations for the value.

    Time

    A time is a three-part value (hour, minute, and second) designating a time of day using a 24-hour clock.

    The range of the hour part is 0 to 24, while the range of the minute and second parts is 0 to 59. If the hour is 24, the minute and second specifications are both zero.

    The internal representation of a time is a string of 3 bytes. Each byte consists of two packed decimal digits.

    The first byte represents the hour, the second byte the minute, and the last byte the second.

    The length of a TIME column as described in the SQLDA is 8 bytes, which is the appropriate length for a character-string representation of the value.

    Timestamp

    A timestamp is a seven-part value (year, month, day, hour, minute, second, and microsecond) that designates a date and time as defined previously, except that the time includes a fractional specification of microseconds.

    The internal representation of a timestamp is a string of 10 bytes.

    The first 4 bytes represent the date, the next 3 bytes the time, and the last 3 bytes the microseconds (the last 3 bytes contain 6 packed digits).

    The length of a TIMESTAMP column as described in the SQLDA is 26 bytes, which is the appropriate length for the character-string representation of the value.

    DB2

    Datetime values

    The datetime data types include DATE, TIME, and TIMESTAMP. Although datetime values can be used in certain arithmetic and string operations, and are compatible with certain strings, they are neither strings nor numbers.

    Date

    A date is a three-part value (year, month, and day). The range of the year part is 0001 to 9999. The range of the month part is 1 to 12. The range of the day part is 1 to x, where x depends on the month.

    The internal representation of a date is a string of 4 bytes. Each byte consists of 2 packed decimal digits. The first 2 bytes represent the year, the third byte the month, and the last byte the day.

    The length of a DATE column, as described in the SQLDA, is 10 bytes, which is the appropriate length for a character string representation of the value.

    Time

    A time is a three-part value (hour, minute, and second) designating a time of day under a 24-hour clock.

    The range of the hour part is 0 to 24. The range of the other parts is 0 to 59. If the hour is 24, the minute and second specifications are zero.

    The internal representation of a time is a string of 3 bytes. Each byte consists of 2 packed decimal digits.

    The first byte represents the hour, the second byte the minute, and the last byte the second.

    The length of a TIME column, as described in the SQLDA, is 8 bytes, which is the appropriate length for a character string representation of the value.

    Postgre

    When timestamp values are stored as double precision floating-point numbers (currently the default), the effective limit of precision may be less than 6. timestamp values are stored as seconds before or after midnight 2000-01-01. Microsecond precision is achieved for dates within a few years of 2000-01-01, but the precision degrades for dates further away. When timestamp values are stored as eight-byte integers (a compile-time option), microsecond precision is available over the full range of values. However eight-byte integer timestamps have a more limited range of dates than shown above: from 4713 BC up to 294276 AD.

View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems