Hi! I'm trying to create a query to calculate the number of days between two dates, but I only want to include working days. Is there a way to do this?Most DBAs work seven days a week, weekends and holidays included ;). The provided DateDiff works fine for us!
On a (very slightly) more serious note, what constitutes a "working day" by your definition?
-PatP|||LOL, I definitely realize what days DBAs work... :)
Working days are just the typical Monday through Friday.|||Vacations? Holidays? Snow days? Office closed due to threat of terrorist attack? Those all affect "working days". Or did you mean to ask "I'm trying to create a query to calculate the number of weekdays between two dates, excluding weekends."?|||Would you include Holidays as work days?
IF not I would suggest you have a table calendar with field workday
values 1 , 0
sum the workday field to get your answer.|||Yes, this is what I'm trying to say:
"I'm trying to create a query to calculate the number of weekdays between
two dates, excluding weekends."|||http://www.aspfaq.com/show.asp?id=2453
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment