none
System.Data.DataColumn and T-SQL datetimeoffset RRS feed

  • Question

  • Hi,

    I am a SQL Server DBA.  We need to start integrating with external partners in different timezones, so I am interested in using the T-SQL datetimeoffset data type for my table columns (SQL Server 2008 R2).  I've checked it out, and I am ready to go at the database level, but I am concerned about the impact on the .NET 3.5/4.0 developers I support.  We would be populating the columns with SYSDATETIMEOFFSET(), etc., so that we have the local time with the appropriate offset.

    • What will happen to their programs if they don't change anything in their applications when I change columns from datetime to datetimeoffset(3)?
    • How will the applications' interpretation of the date/time data be impacted?
    • Is there a difference between .NET 3.5 and .NET 4.0?

    I looked at msdn Library for System.Data.DataColumn and its DataType property(1).  It lists the supported "base .NET Framework data types."  This list includes "DateTime"(2) but not "DateTimeOffset"(3).
    (1) http://msdn.microsoft.com/en-us/library/system.data.datacolumn.datatype.aspx
    (2) http://msdn.microsoft.com/en-us/library/system.datetime.aspx
    (3) http://msdn.microsoft.com/en-us/library/system.datetimeoffset.aspx

    If my developers' applications will experience problems with the data type change in the database, what steps would they have to take to adapt their applications to the data type change in the database?

     


    Dan Jameson
    Manager SQL Server DBA
    CureSearch for Children's Cancer
    http://www.CureSearch.org
    Wednesday, February 1, 2012 10:28 PM

Answers

All replies