home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
dbase
/
udfs
/
udf1.prg
next >
Wrap
Text File
|
1992-05-06
|
1KB
|
36 lines
/*
Author: DAVID -(FLASH)- GORDON CompuServ ID - 75130,3664
Originally: Program COPYRIGHT 1991, FlashPoint
Now and Forever: Released into the Public Domain
Note: FlashPoint is a Registered Trademark
Purpose: DateSwap() was designed for date validation. It is
mainly used with reports covering a date range. It
will ensure that the users two date fields are kept
in the proper sequence and that they are real dates.
*/
* Usage In Your Application
******************************************************************************
LOCAL dFirst := dSecond := CTOD(" / / ")
DateSwap(@dFirst, @dSecond)
******************************************************************************
FUNCTION DateSwap(dDate1, dDate2)
LOCAL dTemp
IIF( dDate1 == ctod(" / / "), dDate1 := date(), )
IIF( dDate2 == ctod(" / / "), dDate2 := date(), )
IF dDate1 > dDate2
dTemp := dDate1
dDate1 := dDate2
dDate2 := dTemp
ENDIF
return .t.