home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol13n05.zip
/
NDY2.PRG
< prev
next >
Wrap
Text File
|
1993-12-09
|
1KB
|
38 lines
FUNCTION ndy1
PARAMETERS D
D=IIF(PARAM()=0,DATE(),D)
RETURN PADL((D+1)-CTOD("1/1/"+;
STR(YEAR(D))),3,"0")
FUNCTION ndy2
PARAMETERS D
D=IIF(PARAM()=0,DATE(),D)
RETURN IIF(EMPTY(D) OR ;
TYPE("d")#"D","Inv",;
PADL((D+1)-CTOD("1/1/"+;
STR(YEAR(D))),3,"0"))
*****************************************************************
* FUNCTION ndy FoxPro
* Returns a character string of length 3, left padded with zeros
* reflecting the number of the day of the year: 001-365 or 366.
*****************************************************************
FUNCTION ndy
PARAMETER D
boy = CTOD("01/01/"+STR(YEAR(IIF(EMPTY(D),DATE(),D))))
RETURN PADL(((D - boy) + 1),3,'0')
*****************************************************************
* FUNCTION ndyc Includes parameter check FoxPro
* Returns a character string of length 3, left padded with zeros
* reflecting the number of the day of the year: 001-365 or 366.
*****************************************************************
*****************************************************************
FUNCTION ndyc
PARAMETER D
boy = CTOD("01/01/"+STR(YEAR(IIF(PARAM()=0,DATE(),D))))
RETURN IIF(EMPTY(D) OR TYPE("d")#"D","Inv",;
PADL(((D - boy) + 1),3,'0'))