Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find starttimes past 7pm on Fridays

Status
Not open for further replies.

gcoast

Programmer
Dec 17, 2003
39
US
I need a query that will find shift times starting after 7pm on Fridays. I know I can use the "datepart(dw, starttime) to find the dow but I just need the records past 7pm. I need to query from a schedule table that has schedules for the next 6 months.

Thanks,

gc
 
You can also use DatePart to get the hour. This will return an integer representing the hour. This is 'military time' so 2 PM is 14.

Select DatePart(Hour, GetDate())


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top