I can extract the month and day by using Day(Date()), Month(Date()). I can\'t extract hours, with HOUR(Date()). I get the following er
Day(Date())
Month(Date())
HOUR(Date())
select case when [am or _pm] ='PM' and datepart(HOUR,time_received)<>12 then dateadd(hour,12,time_received) else time_received END from table
works