• peterhe

    SSChampion

    Points: 11363

    These are ODBC format data type, from BOL:

    ODBC Datetime Format

    The ODBC API defines escape sequences to represent date and time values, which ODBC calls timestamp data. This ODBC timestamp format is also supported by the OLE DB language definition (DBGUID-SQL) supported by the Microsoft OLE DB Provider for SQL Server. Applications using the ADO, OLE DB, and ODBC-based APIs can use this ODBC timestamp format to represent dates and times.

    ODBC timestamp escape sequences are of the format:

    { literal_type 'constant_value' }

    literal_type

    Specifies the type of the escape sequence. Timestamps have three literal_type specifiers:

    d = date only

    t = time only

    ts = timestamp (time + date)

    'constant_value'

    Is the value of the escape sequence. constant_value must follow these formats for each literal_type.

    literal_type constant_value format
    D yyyy-mm-dd
    T hh:mm:ss[.fff]
    Ts yyyy-mm-dd hh:mm:ss[.fff]

    These are examples of ODBC time and date constants:

    { ts '1998-05-02 01:23:56.123' }

    { d '1990-10-02' }

    { t '13:33:41' }