date conversion

SQLServerCentral Article

Combine DATE and TIME to DATETIME2 in SQL Server

  • Article

The most common method on the internet for combining DATE and TIME columns in SQL Server is incorrect. This article demonstrates why that and other methods are incorrect and two lesser known high performance methods that produce correct results even for the "edge cases".

5 (3)

You rated this post out of 5. Change rating

2023-08-07

4,153 reads

SQLServerCentral Article

4.9 (10)

You rated this post out of 5. Change rating

2022-07-13

15,626 reads

Blogs

A New Word: Ghough

By

ghough – n. a hollow place in your psyche that can never be filled;...

T-SQL Tuesday: Encryption and Data Protection

By

I have the honour of hosting this month’s T-SQL Tuesday. In case there’s any...

Parameterize your Databricks notebooks with widgets

By

Widgets provide a way to parameterize notebooks in Databricks. If you need to call...

Read the latest Blogs

Forums

Community at PASS Summit

By Ryan Booz

Comments posted to this topic are about the item Community at PASS Summit

Facing Error in Development

By hema41

Hi all As a seasoned developer, I had faced fair share of coding challenges...

ASCII value of certain column is null

By SQL_Surfer

When ASCII(Column) is null, what does it represent? Is this some kind of special/control...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers