Top "Datetime2" questions

A SQL Server type that defines a date that is combined with a time of day that is based on 24-hour clock.

DateTime2 vs DateTime in SQL Server

Which one: datetime datetime2 is the recommended way to store date and time in SQL Server 2008+? I'm aware of differences …

sql sql-server tsql datetime datetime2
Using SQL Server 2008 and SQL Server 2005 and date time

I've built a entity framework model against a 2008 database. All works ok against the 2008 database. When I try to update …

sql-server-2005 entity-framework sql-server-2008 datetime datetime2
How do I calculate interval between two datetime2 columns (SQL Server)?

Hi I'm trying to calculate the difference between two columns of datetime2 type. However SQL server (2012) doesn't seem to like …

sql-server intervals datetime2
SQL Server 2008: Get date part from datetime2

I've been using this very handy method of extracting the date portion from a datetime value: select dateadd(day, datediff(…

sql-server sql-server-2008 datetime2
Insert date string to datetime2 in TSQL insert

I need to insert a date string as DATETIME2 in the QUEUE table in Microsoft Sql Server. DB structure: CREATE …

sql-server tsql insert datetime-format datetime2
Why does EF5 code first use datetime2 when inserting a nullable datetime into the database?

I am saving a Cart object to the database that has a nullable datetime. This is the error I get: …

entity-framework datetime ef-code-first datetime2
SQL Server smalldatetime vs datetime2

I've read several articles about using data types that support dates in SQL Server but I'm still undecided about what …

sql-server datetime2 smalldatetime
SSIS 2008 Execute SQL output parameter mapping datetime2 problem

I'm trying to use an Execute SQL Task in SSIS 2008 to map a store procedure output parameter to a package …

sql-server-2008 ssis types parameters datetime2
Is there a function like isdate() for datetime2?

I know there is a function called ISDATE to validate DATETIME columns, but it works only for the SMALLDATETIME and …

sql-server-2008 tsql sql-server-2012 datetime2
Concatenate date and string to create datetime in SQL

I need to concatenate a datetime and a time field in SQL to a single date time. e.g I …

sql sql-server date datetime2