What are equivalent C# data types for SQL Server’s date, time and datetimeoffset?

Here are the equivalent CLR data types for date, time and datetimeoffset SQL Server data types:

dateDateTime, Nullable<DateTime>
timeTimeSpan, Nullable<TimeSpan>
datetimeoffsetDateTimeOffset, Nullable<DateTimeOffset>

Note that you can find a listing of all SQL Server data types and their CLR equivalents here, Mapping CLR Parameter Data

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)