Date Valadation and MatchText
Ken Ray
kray at sonsothunder.com
Wed Dec 21 20:28:54 EST 2005
On 12/21/05 5:33 PM, "Jeff Honken" <jhonken at x12.info> wrote:
> I've been trying to write some error coding for a text field containing
> a date. I found some old code that someone wrote in the past but I'm
> having a hard time figuring out how it's working. I'm trying to get the
> code so if the Year is 5 digits it gets flagged as a bad date. The
> pattern I'm trying to check is: mm/dd/yyyy
You should be able to just say:
if pDateToCheck is a date then ...
No need to run a function unless you are planning on checking a bunch of
other date formats that aren't support by the "is a date" approach (like
MySQL's YYYY-MM-DD)...
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list