Ryan, Thanks for pointing me to the DNW function. I was able to find a rather simple method using the function to get the desired results.
James Belisle Making Information Systems People Friendly Since 1990 [cid:[email protected]] From: [email protected] [mailto:[email protected]] On Behalf Of Ryan Blanchard Sent: Monday, May 4, 2020 7:39 PM To: [email protected] Subject: Re: [RBASE-L] - eliminate weekends Hi James, You can use the DNW function to get the next business day from a specific date. One possible option: ---------------------------------- SET VAR vtest1 DATE = ( DNW ( #DATE ) ) SET VAR vtest2 DATE = ( DNW ( .vtest1 ) ) SET VAR vtest3 DATE = ( DNW ( .vtest2 ) ) SET VAR vtest4 DATE = ( DNW ( .vtest3 ) ) ... ---------------------------------- and so on until you get the number of days you need since the function increments by one. One line for every day added and the output variable being what the last line is set to. Another Option: ---------------------------------- SET VAR vloopcount1 = 0 SET VAR vloopcount2 = 7 SET VAR vtestdate DATE = #date WHILE vloopcount1 < vloopcount2 THEN SET VAR vtestdate = ( DNW ( .vtestdate ) ) SET VAR vloopcount1 = ( .vloopcount1 + 1 ) IF vloopcount2 <> 0 THEN Continue ENDIF BREAK ENDWHILE ---------------------------------- This option allows you to not have so many variables with the output variable being vtestdate. Also, it's easy to change the number of days by changing what vloopcount2 is set to. Ryan On Mon, May 4, 2020 at 4:51 PM Jim Belisle <[email protected]<mailto:[email protected]>> wrote: I want to get a date in the future based on 7 business days in the future. So how do I add to a present date, let’s say 05/04/2020 seven days in the future but eliminate the weekends? I see functions for IDWK and TDWK but am unsure how to create the var that gives me seven business days out. James Belisle Making Information Systems People Friendly Since 1990 [cid:[email protected]] -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/CY4PR0201MB3394F5AF4E44571D0399CE78A0A60%40CY4PR0201MB3394.namprd02.prod.outlook.com<https://groups.google.com/d/msgid/rbase-l/CY4PR0201MB3394F5AF4E44571D0399CE78A0A60%40CY4PR0201MB3394.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer>. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/CADj97FnGiZf%3D-yTntr9qH6nbWYjpnPAHwW_t%2Byvqm1oDfFba0g%40mail.gmail.com<https://groups.google.com/d/msgid/rbase-l/CADj97FnGiZf%3D-yTntr9qH6nbWYjpnPAHwW_t%2Byvqm1oDfFba0g%40mail.gmail.com?utm_medium=email&utm_source=footer>. ________________________________ -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/CY4PR0201MB33942F9F58A89913C4E0D0D9A0A20%40CY4PR0201MB3394.namprd02.prod.outlook.com.

