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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to be start a week @ 3am Monday

Status
Not open for further replies.

yshum157

Programmer
Mar 1, 2004
1
US
I need to group a bunch of timestamped events into weeks. I use DATEFIRST = 1 to set Monday as the beginning of a week. Is it possible to set the beginning of a day as 03:00 instead of 00:00? In other words, events happened between Monday's 00:00 and 02:59 will be considered as previous week's when using datepart.

Many thanks in advance.
 
Hi

Can't you simply subtract 3 hours from the date/time before checking the day?

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top