date validation.

anandknr

Member
Hi all,

Do we have any function for date validation .

31/03/2011 should be a valid date where as 31/04/2011 should be a invalid date....How to check this ?
 
You can always the "built-in" validation into the date data type.
ASSIGN myDate = DATE ( something ) NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
/* There you are with your invalid date */
END.

But, I am not aware of any other built-in function.

Heavy Regards, RealHeavyDude.
 
Like RHD says, Progress is able to validate dates for variables with a date format. If the user is being asked to enter a date, then ensure the fill-in hasd a date format and they will be unable to enter an invalid one. Alternatively, as RHD says, you can check if it makes a valid date that way.
 
Back
Top