i have this SQL statement I want to combine ‘date’ and ‘dayOfWeek’ Column
SELECT CONVERT(date,startTimeStamp) AS DATE
, datename(dw,CONVERT(date,startTimeStamp)) as dayOfWeek
,CONVERT(time,[startTimeStamp])AS StartTime
,CONVERT(time,[endTimeStamp])AS EndTime
,DATEDIFF(HH,[startTimeStamp] ,[endTimeStamp])
FROM [TaskManagementSystem_DB].[dbo].[Timesheet_entry]
Sounds like you want this:
To concatenate the fields together you must
cast()them to the same datatype, similar to this:see SQL Fiddle with Demo