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

81 reads

Blogs

Power Platform Quick Tips – Episode 03: Documenting Power Automate Flow Logic

By

Welcome back to my series on Power Platform quick tips! In this episode you...

State of Database DevOps Survey

By

Maybe you’re using DevOps within your database development and deployment. Maybe you’re not. Maybe...

HP is the 2019 Laptop Winner

By

This is for me, not necessarily for you, but I decided to go with...

Read the latest Blogs

Forums

How to get information about an AG group using powershell

By vsamantha35

Hi Experts, Does anyone has a powershell script which displays below information: for a...

Find out who stopped my SQL Services

By vsamantha35

Hi Experts, Is there a way to find out which windows user has stopped...

What is MARS

By vsamantha35

Hi Experts, What is actually meant by Multiple Active Result Sets (MARS) in SQL...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers