Re: validating a date in hstools?
Posted in 1994
Charlie: Validating a date is pretty easy and like most things in HST, there are a couple of ways to do it. Here is the easiest. If you want to let them type willy nilly any legal date, attach a script similar to the following psuedo-code (that means I havent tested it!) to the field in question. DEFINE date_val ON EXIT date_val = CTSTRING("date_field",0) IF DATEVALUE(date_val) = 0 { bad value? Try it } SOUND EFFECT "simple beep" ABORT EXIT { dont let them leave } END IF END EXIT This should work although you may have to verify the value again when they OK the dialog. As noted above, Im not sure what the value/type DATEVALUE returns when you give it an illegal value. Have fun, jvr