August 31, 200619 yr Hello all, I have a DB which stores some order line for a sale order. Every record has a code that is the key for a relationship with my supplier database. All the suppliers has a number that represents the shipment days (i place an order to that supplier and - i.e. - he ship the goods within 3 days). Here comes the troubles. I must calculate the arrival date excluding all the saturdays and sundays because they aren't working days! I hope I explained the problem well. Any idea or suggestion to help me?
August 31, 200619 yr Author Well, maybe I've found a simple solution: Today + ShipmentDays + Celing((ShipmentDays/7)*2); last number evaluate the number of weeks beetween today and the Shipment date and multiply the week number for 2 (1 = saturday, 2 = sunday). I use 'ceiling' to avoid decimal numbers.. in fact I'm still testing this calculation, it seems to be a good workaround.. at least It works. if you have other and better soultions, please share them! -) Bye!
August 31, 200619 yr The problem with your formula is that it does not recognize partial weeks. For example, 1 day from Monday should be Tuesday - but you return Wednesday. See also here.
Create an account or sign in to comment