Dan:

I haven't spent much time on it but have you looked at the DNW and DWE 
date functions?

The DNW function gives you the date of the next working day which excludes 
Sat and Sun.  So the next working day from 06/02/2017 is 06/05/2017.

The DWE function gives you the date of the next weekend day, ie Sat and 
Sun.

Maybe some kind of combination of these functions could work.

Food for thought.

Have a good evening.




Mike Ramsour
AK Steel Coshocton Works
Quality Department
Phone:  740-829-4340
Cell:  740-502-1659



From:   Dan Goldberg <[email protected]>
To:     "[email protected]" <[email protected]>, 
Date:   09/05/2017 03:28 PM
Subject:        RE: [RBASE-L] - calculate number of business days
Sent by:        [email protected]



Thx that is what I was thinking of doing. Just a little slower but will 
work.
 
Dan Goldberg
 
From: karentellef via RBASE-L [mailto:[email protected]] 
Sent: Tuesday, September 5, 2017 12:07 PM
To: [email protected]
Subject: Re: [RBASE-L] - calculate number of business days
 
I'm not aware of any function that will do it.  Here's a simple while 
loop, in case you don't already do this.  vCount would have the #days


SET VAR vDays = (.vedate - .vbdate)
SET VAR vCount INT = 0, vLoop INT = 0
WHILE vLoop <= .vDays THEN
  SET VAR vTestDate = (.vbdate + .vLoop)
  IF (IDWK(.vTestDate)) BETWEEN 1 AND 5 THEN
    SET VAR vCount = (.vCount + 1)
  ENDIF
  SET VAR vLoop = (.vLoop + 1)
ENDWHILE

Karen
 
 
 
-----Original Message-----
From: Dan Goldberg <[email protected]>
To: rbase-l <[email protected]>
Sent: Tue, Sep 5, 2017 1:04 pm
Subject: [RBASE-L] - calculate number of business days
I need to calculate the number of business days between to date values. 
 
Which gives me the number of days. But I need to calculate the number of 
days without weekends. 
 
I cannot find a function that will achieve the results in need.
 
Does anyone have an idea on how to calculate it?
 
TIA 
 
 
Dan Goldberg
 
-- 
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].
For more options, visit https://groups.google.com/d/optout.
-- 
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].
For more options, visit https://groups.google.com/d/optout.
-- 
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].
For more options, visit https://groups.google.com/d/optout.


Confidentiality Notice
This message is intended exclusively for the individual or entity to which it 
is addressed and may contain privileged, proprietary, or otherwise private 
information.  
If you are not the named addressee, you are not authorized to read, print, 
retain, copy or disseminate this message or any part of it.  If you have 
received this message in error, please notify the sender immediately by e-mail 
and delete all copies of the message.

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to