home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
clipper
/
rettig
/
tr_inwk.prg
< prev
next >
Wrap
Text File
|
1990-10-21
|
553b
|
24 lines
*********
* Function : INWEEKS
* By : Tom Rettig
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*********
FUNCTION INWEEKS
* Syntax: INWEEKS( <start date>, <end date> )
* Return: <expN> number of weeks between two dates
* Note..: Both parameters are <expD>
* Result is affected by the current state of SET DECIMALS
*
PARAMETERS tr_start, tr_end
IF tr_start > tr_end
* Error -- start date is greater than end date
RETURN -1
ELSE
RETURN ( tr_end - tr_start + 1 ) / 7
ENDIF
* eofunc inweeks