I have a project where I need to upload a date and a time seperately into SQL Server, yet they need to be in one field in the database. Here is a sketch of the solution:
CREATE PROCEDURE zzz_JohnTest @StartDate datetime, @StartTime varchar(50)
AS
declare @startdatetime datetime
declare @strDateTime varchar(200)
-- this next line converts the date parameter to a string in the format of "MM/DD/YYYY" and adds the time
select @strDateTime = Convert(varchar(100), @StartDate, 101) + ' ' + @StartTime
select @startdatetime = cast (@strDateTime as datetime)
select @startdatetime as StartDateTime
GO