petal Posted January 24, 2007 Posted January 24, 2007 good day everyone. i am looking for an elegant way for a planning schedule to ignore weekends. by this, i mean that if, on a friday, i shedule a task to take 3 days, it will return the deadline as wednesday (and not monday). it would be doubly elegant if i could also enter public holidays and ask the schedule to ignore those too. any suggestions would be welcome many thanks petal
mr_vodka Posted January 24, 2007 Posted January 24, 2007 I dunno about premade elegant solutions, but you can take a look at these threads and see if they help. Thread 1 Thread 2 Thread 3
David McQueen Posted January 24, 2007 Posted January 24, 2007 I am not sure how elegant this is. 1. Set up a table of holiday dates. Also have a constant in this table ( say "1") 2. Set the number of days to do a task into a global field. 3. Set up a "Set" script that is for processing. Basically it starts at tomorrow and goes through each day until it reaches the number of days alloted. At each day, it checks (a) is it a saturday or sunday. If it is, the global counter is not decremated. ( Does the Date poled relate to the holiday table and have a related constant = 1. Again, if it does, the counter is not decremated. When the counter reaches 0, that is the date set for the task to be completed before another date is poled. So it is less a database operation than it is an application process. HTH Dave McQueen
Recommended Posts
This topic is 6778 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now