I'm not sure of an exact query, but if you can get the total number of days you can mathmatically get the biz days with the following math (in psuedo code):
$days = total_days_between_a_and_b; $weeks = ($days / 7); $weekend_days = $weeks * 2; $business_days = ($days - $weekend_days); Hope this helps. There may be more elegant ways of getting such a value. This doesn't take into account day A being wednesday. You might be able to do a SELECT COUNT(*) on evaluating your date to it's Day value in ('Mon','Tue','Wed','Thu','Fri') Check the date commands. --Joe -- Joe Stump <[EMAIL PROTECTED]> http://www.joestump.net "Label makers are proof God wants Sys Admins to be happy." -----Original Message----- From: Lucas Cowgar [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 9:59 AM To: MySQL Mailing List Subject: # of Business Days? Can anyone out there help me with a SQL query? I need to find the number of business days between date a and b? Obviously finding simply the number of days is easy, but I have no clue how to find the number of business days. TIA! Lucas Cowgar Information Technologies Department Eldorado Services Group Inc. http://www.eldoserv.com [EMAIL PROTECTED] (330) 861-3009 "All your base are belong to us" --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php