System.DateTimeOffset Methods

Once mapped in the object model or external mapping file, LINQ to SQL allows you to call most of the System.DateTimeOffset methods, operators, and properties from within your LINQ to SQL queries.

The only methods not supported are those inherited from System.Object that do not make sense in the context of LINQ to SQL queries, such as: Finalize, GetHashCode, GetType, and MemberwiseClone. These methods are not supported because LINQ to SQL cannot translate them for execution on the SQL Server.


The common language runtime (CLR) System.DateTimeOffset structure, and the ability to map it to a SQL DATETIMEOFFSET column with LINQ to SQL, requires the .NET Framework 3.5 SP1 or beyond. The SQL DATETIMEOFFSET column is only available in Microsoft SQL Server 2008 and beyond.

SQLMethods Date and Time Methods

In addition to the methods offered by the DateTimeOffset structure, LINQ to SQL offers the following methods from the System.Data.Linq.SqlClient.SqlMethods class for working with date and time:

See also