Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6261 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

Try wrapping it in a GetAsDate function. This evaluates false:

IsValid( GetAsDate ( "9/31/2007" ) )

Posted

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...

Posted

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.

Posted

Ok, my mistake -- I had named it as a date field but it was actually a text field. Sorry for the confusion!

This topic is 6261 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.