I am getting date as input from an unprotected field in the format YYYY-MM-DD and validate that date. Do anyone know any routine to validate the date? Like for a non-leap year user cannot enter Feb 29 or invalid date like 2007-14-31 :!:
Look at INTEGER-OF-DATE and DATE-OF-INTEGER. If you removed the "-"s and converted the date to an integer and back to a date, you could compare the first to the second - if they are different, the first date was invalid.
But i found that a small query can be used to evaluate the input date. The query is,
where ws-vld-dt is the input date in the format YYYY-MM-DD. if the response of this query is normal, then the date is valid!!