i am using the DatePart function to do the following
"Sum(CASE DATEPART(dw,pdate) When 1 Then 1 ELSE 0 END) AS Sunday"
But would liek break sunday into morning and evening
have tried (Ftiem been the tiem field on my table)
"Sum(CASE DATEPART(dw,pdate) When 1 And Ftime between '01:00:00' And '11:59:00' Then 1 ELSE 0 END) AS SundayMorning"
But get errors is it possible to do this using the DatePart fucntion or is there another way around this
Kind Regards,
Mick
"Sum(CASE DATEPART(dw,pdate) When 1 Then 1 ELSE 0 END) AS Sunday"
But would liek break sunday into morning and evening
have tried (Ftiem been the tiem field on my table)
"Sum(CASE DATEPART(dw,pdate) When 1 And Ftime between '01:00:00' And '11:59:00' Then 1 ELSE 0 END) AS SundayMorning"
But get errors is it possible to do this using the DatePart fucntion or is there another way around this
Kind Regards,
Mick