Nirmal KumarC

Nirmal KumarC

  • NA
  • 327
  • 79.5k

How to concatenate date and time in sql server 2005?

Jan 30 2015 4:02 AM
Sql server 2008 Concatenate successful Running but Sql server 2005 Not Concatenate ,
This Below Query.


DECLARE @fromdate Date DECLARE @ShiftStart varchar(60)='09:00' select @fromdate=CONVERT(VARCHAR(10),'2014-12-16 10:18:00.000',101) SELECT CAST(@fromdate AS DATETIME) + CAST(@ShiftStart AS DATETIME)




The Above query wise how to concatenate(date and time)in sql server 2005.
 
I want concatenate(date and time) Result is 2014-12-16 09:00:00.000.
 
Thanks

Answers (1)