![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, Please can you point me in the right direction. I have a table (JobMain) that holds a list of all jobs that out engineers need to work on or have worked on. I would like to select jobs that fall between Monday - Friday 8am to 7pm. The tables holds a load of colums ... the two that are of interest to me are JobId (Primary Key) - Job Number StartDate (Datetime datatype) - Job start date and time regards Rob |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Hello, Rob Try something like this: SELECT * FROM YourTable WHERE DATEPART(hh,StartDate) BETWEEN 8 AND 18 AND (DATEPART(w,StartDate)+@@DATEFIRST)%7 BETWEEN 2 AND 6 Razvan |
![]() |
| Thread Tools | |
| Display Modes | |
| |