Technical Article

Adds TIME portion of a DT to the DATE of another

UDF that returns a DATETIME which is the concatination of the TIME portion of one DATETIME and the DATE portion of another.EXAMPLES:DECLARE @Date DATETIME, @Time DATETIMESET @Date = '7/1/03 16:00'SET @Time = '5/16/1999 9:30 AM'PRINT dbo.FN_AddDateTime(@Date,@Time )RETURNS: Jul  1 2003  9:30AMPRINT dbo.FN_AddDateTime(@Date,0)RETURNS: Jul  1 2003 12:00AM

2003-07-01

86 reads

Blogs

VMware & SQL Server 823-824 alerts

By

We’ve been tracking a weird state with SQL Server virtual machines on VMware and...

Daily Coping 18 May 2022

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Storage Field Day 23 – SIOS

By

I am thrilled to have been a part of this year’s Storage Field Day...

Read the latest Blogs

Forums

Search not working???

By jbalbo

Hi, We have a user that is not an administrator that says when they...

sql server enterprise edition or standard

By juliava

Hello, I was looking over the Edition specifications, and Standard is capped at 128...

Quick Question on 2019 to older version?

By oogibah

A client of ours is upgrading their database to SQL Server 2019. The edition...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers