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

80 reads

Blogs

Quick 6 month check – how are those learning goals going…?

By

So in January I wrote a blog post on some goals I had this...

Power BI Monthly Digest – July 2019

By

In this month’s Power BI Digest with Manuel Quintana [Blog | Twitter] and I...

Read the latest Blogs

Forums

Error: 17892 Severity: 20 State: 1

By ismahar

Hi, I've been struggling for 5 days to solved this issue. We have a...

Mass replace of DB codes

By berki

Hi, I have a column in a table that contains variable semi-colon DB codes...

Changing Hardware

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Changing Hardware

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Intersection

See possible answers