[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FT_ADDWKDY()
Return true number of days to add given number of workdays
------------------------------------------------------------------------------
Syntax
FT_ADDWKDY( <dStart>, <nWorkDays> ) -> nTrueDays
Arguments
<dStart> = date to start adding from
<nWorkDays> = number of workdays to add
Returns
<nTrueDays> = Number of actual days to add to <dStart> in
order to add the required <nWorkDays>
Description
Let's say you are given the problem:
"All invoices are due 10 working days from the date they
are printed. Please display the due date on the invoice."
When is the due date? Assuming you are printing the invoices
today, your answer is:
dDueDate := DATE() + ft_addWkDay( DATE(), 10 )
A work day is defined as Monday through Friday. Unfortunately
this routine does _not_ account for holidays.
This documentation was written by Glenn Scott so if it's wrong,
blame him.
Examples
// Postdate 5 working days from the first of January
dPost := CTOD("01/01/91")
dPost += FT_ADDWKDY( dPost, 5 ) // returns 7 true days
? dPost // 01/08/91
Source: WDA.PRG
Author: Eric Splaver
See Also:
FT_WORKDAYS()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson