October 4, 200718 yr I have a date field in a Custom Message Box, and I've found that if the user enters "9/31/2007" my script fails (since there is no September 31st). I've tried IsValid(dateField) but this returns true for "9/31/2007". Is there an easy way to test for a well-formatted but meaningless date using a calculation in a script step?
October 4, 200718 yr Try wrapping it in a GetAsDate function. This evaluates false: IsValid( GetAsDate ( "9/31/2007" ) )
October 4, 200718 yr Hee, Hee, I was staring at your solution: Try wrapping it in a GetAsDate function. This evaluates false: IsValid( GetAsDate ( "9/31/2007" ) ) trying to figure out why that would return false...Oh yeah, September only has 30 days! Man, I gotta get a calendar...
October 4, 200718 yr I don't get this. If I enter an invalid date into a DATE field using a custom dialog, then ask if the date is valid, i.e. IsValid ( Datefield ), the answer is FALSE.
October 4, 200718 yr Author Ok, my mistake -- I had named it as a date field but it was actually a text field. Sorry for the confusion!
Create an account or sign in to comment