Using SQL Server 2008, this query works great:
select CAST(CollectionDate as DATE), CAST(CollectionTime as TIME)
from field
Gives me two co
An easier solution (tested on SQL Server 2014 SP1 CU6)
Code:
DECLARE @Date date = SYSDATETIME();
DECLARE @Time time(0) = SYSDATETIME();
SELECT CAST(CONCAT(@Date, ' ', @Time) AS datetime2(0));
This would also work given a table with a specific date and a specific time field. I use this method frequently given that we have vendor data that uses date and time in two separate fields.