New Era: Validating a date problem
Posted in 1998
Hi, I'm new to New Era (v2.12) and am having difficulty validating a date. Basically, I have an character string pulled from a text box. No problems. This string should be a date so when I post the data in the form I check that the text pulled from the text box is like a date before trying to update the database. e.g WHENEVER ERROR CONTINUE VALIDATE mtStr LIKE dbname.dob WHENEVER ERROR STOP When I submit the info (with an invalid date) I get an error - bad string to date conversion error. I've declared the database name so it knows where to look, just seems that I can't trap the error before it gets to the database side. If I enter a valid date, there's no problems. Can anyone point me to where I'm going wrong or how they would normally validate a date. Thanks for any replies John