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

84 reads

Blogs

Goal Progress–November 2020

By

This is my report, which continues on from the Oct report. It’s getting near...

Azure Synapse Analytics is GA!

By

(Note: I will give a demo on Azure Synapse Analytics this Saturday Dec 5th...

5 Things You Should Know About Azure SQL

By

Azure SQL offers up a world of benefits that can be captured by consumers...

Read the latest Blogs

Forums

Database, RAM and processor Information

By sizal0234

Hi, I need to find the size of all db's and server's processor and...

reference for writing stored procedures (especially spatial) in DB2

By pietlinden

I can write stored procedures in SQL Server ... is there a guide somewhere...

A Technology Collapse

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Technology Collapse

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers