About 52 results
Open links in new tab
  1. c# - DateTime vs DateTimeOffset - Stack Overflow

    Dec 2, 2010 · What is the difference between a DateTime and a DateTimeOffset and when should one be used? Currently, we have a standard way of dealing with .NET DateTimes in a TimeZone-aware …

  2. c# - DateTimeOffset proper usage - Stack Overflow

    Feb 29, 2012 · If I have a DateTime instance which represents a valid UTC time, and an offset that converts that DateTime to the time zone where it applies, how do I construct a DateTimeOffset …

  3. Difference between 'DateTime' and 'DateTimeOffset' - Stack Overflow

    Jan 31, 2012 · What is difference between a DateTime and a DateTimeOffset object? And when should we use each one? In a web-application that may change the server's area, storing date and time. …

  4. c# - How to store DateTimeOffset in PostreSQL - Stack Overflow

    Mar 18, 2015 · For DateTimeOffset, you should be using a timestamp with time zone type in postgres. But since you didn't post any code, all I can do is comment and vote to close.

  5. When Would You Prefer DateTime Over DateTimeOffset

    Whilst I wouldn't PREFER to use DateTime over DateTimeOffset, please note that sometimes you NEED to, as MS .Net does not support DateTimeOffset as a DataColumn.DataType property …

  6. How do I convert a DateTimeOffset? to DateTime in C#?

    Dec 11, 2015 · 10 I need to convert a DateTimeOffset? to a DateTime. The value originally comes from a XAML CalendarDatePicker, but I need to change it to DateTime to store the value. I have found …

  7. How to extract just the date from a DateTimeOffset object

    Jul 17, 2014 · What do you mean by "getting the whole date"? The Date property will return a DateTime object, with the time portion set to midnight.

  8. How to convert a DateTimeOffset to a specified format?

    Nov 7, 2025 · I need to convert a DateTimeOffset variable to below format: Instead of a ., I need a : before the offset and the offset should be without a leading 0. DateTimeOffset PassDate = …

  9. How to cast datetime to datetimeoffset? - Stack Overflow

    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 TOP 5 Change...

  10. c# - EF Core DateTimeOffset - Stack Overflow

    May 7, 2022 · I just tested creating a simple model including a DateTimeOffset with SQL Server and EF Core 6. Works fine, including initially using DateTime, and then changing to DateTimeOffset in a …