James,
Two possible solutions:
1. by using Switch / Endsw command
SET VAR V_CURRENT_DAY = (IDWK(.#DATE))
SWITCH (.V_CURRENT_DAY)
CASE 1
SET VAR V_WORKINGDAY_7 = (.#DATE + 9)
BREAK
.......
CASE 5
SET VAR V_WORKINGDAY_7 = (.#DATE + 11)
BREAK
.......
DEFAULT
BREAK
ENDSW
probably you can optimise this switch
2. Create a calendertable with only working days in it.
Fillin the starting date and jump 7 days ahead.
If the filled-in date is a weekend date you have to do something with
your select statement.
For instance find the first date after the weekend in the table.
The nice thing about this solution is that you even are able to solve
problems with days like X-mas.
Tony
Op 5-5-2020 om 00:51 schreef Jim Belisle:
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/0e47d078-b4da-1682-50c8-c4b70674c4dc%40cio-bv.nl.