About 39,900 results
Open links in new tab
  1. sql server - How to cast datetime to datetimeoffset? - Stack …

    How can i convert an SQL Server datetime value to a datetimeoffset value? For example, an existing table contains datetime values that are all in "local" server time. SELECT …

  2. datetimeoffset vs datetime2 for UTC on SQL Server

    Feb 12, 2021 · If you are storing only UTC values (where the offset is always zero), you can save storage space with datetime2. datetimeoffset requires 10 bytes of storage whereas datetime2 …

  3. sql - Storing DateTime (UTC) vs. storing DateTimeOffset - Stack …

    Should I continue storing my dates (SQL 2008 - datetime) in UTC format or should I instead store it using DateTimeOffset (SQL 2008 - datetimeoffset)? UTC Dates in the database (datetime …

  4. t sql - Using SQL Server datetimeoffset - Stack Overflow

    Jan 9, 2015 · 4 Yes, DateTimeOffset is exactly what you want. Secondly, your select list for available offsets should come from the ISO list () SQL Server doesn't care if the timezone …

  5. c# - DateTime vs DateTimeOffset - Stack Overflow

    Dec 2, 2010 · @ZackJannsen If you have a DateTimeOffset in C#, then you should persist that to a DATETIMEOFFSET in SQL Server. DATETIME2 or just DATETIME (depending on the …

  6. How does Microsoft SQL Server compare datetime to …

    Sep 28, 2021 · 3 I'm working with a legacy database (running on SQL Server 2019) which uses datetime for columns storing timestamp information and I'm trying to get a better handle on …

  7. sql server - DateTimeOffset.Now in T-SQL - Stack Overflow

    Jun 26, 2009 · I'm executing a INSERT to a sql 2008 db. How do I specify in T-SQL to insert NOW in a DATETIMEOFFSET column? GETDATE()?

  8. How to migrate DateTime values to DateTimeOffset in SQL Server?

    Oct 15, 2018 · Within SQL what is the best practice for this type of migration without losing any data, or changing existing values? Taking it to the next step, what is the most efficient method …

  9. Getting offset of datetimeoffset in SQL Server - Stack Overflow

    May 8, 2007 · In SQL Server I need to find the offset of a given datetimeoffset(7). I have researched the documentation and there are all ways to change the offset but not a way to …

  10. How do I update a column's offset in SQL Server?

    Nov 25, 2015 · 17 I converted a table's DateTime field to DateTimeOffset, but now the offset is automatically set to +00:00. I need to change all DateTimeOffset fields of this table to an offset …