ISO 8601

  • I have inserted data into database using ISO 8601 format. (which is a stable standard across databases !?). Now i want to know the SQL command or stored procedure that tells me that my data is stored in this format.

    Please let me know if you know the name of any such command or stored proc.

    regards,

    petrushka

     

     

     

  • ISO 8601 is referred to Datetime "representation"  in the query language. When the data (datetime) is saved it goes in to two 4-byte integers!

    FROM BOL:

    Values with the datetime data type are stored internally by Microsoft SQL Server as two 4-byte integers. The first 4 bytes store the number of days before or after the base date, January 1, 1900. The base date is the system reference date. Values for datetime earlier than January 1, 1753, are not permitted. The other 4 bytes store the time of day represented as the number of milliseconds after midnight.

    The smalldatetime data type stores dates and times of day with less precision than datetime. SQL Server stores smalldatetime values as two 2-byte integers. The first 2 bytes store the number of days after January 1, 1900. The other 2 bytes store the number of minutes since midnight. Dates range from January 1, 1900, through June 6, 2079, with accuracy to the minute

    Due to the fact that the actual storage is independent on how you specified at the time of entry makes that metadata lost!

    In other words you can't tell how it was sent! (unless you take a do it your self approach )

     


    * Noel

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply