Kevin,

Technically speaking most numbers can be coerced into a date. Basically if
you can do a "convert <date> to dateItems" and have it return a valid set of
numbers, it can be coerced into a date. Here's a few examples:

put (10 is a date)
--> true
convert "10" to dateItems
--> 1969,12,31,18,0,10,4  <-- 10 is the number of seconds

put (10.30 is a date)
--> true
convert "10.30" to dateItems
--> 1969,12,31,18,0,10,4  <-- 10 is the number of seconds, ignores the
decimal

put ("10/30" is a date)
--> true
convert "10/30" to dateItems
--> 2001,10,30,2,0,0,3  <-- reads "10/30" of current year

I agree that you should request that the user enter things in a consistent
format, such as "mm/dd/yy" or "mm/dd/yyyy". Keep in mind that something like
"dd/mm/yyyy" will only work if the computer has been set up for a date
setting like that, otherwise it'll be considered an invalid date. Also, take
a look at the "centuryCutoff" property to help in date formatting.

Just my $0.02.

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Kevin Wilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 17, 2001 5:21 PM
Subject: Verifying dates


> Hello List. Hoping that you can help me with a question. I am trying to
> confirm that a seies of numbers being input by a user are a valid date,
> using the "is a date" type check operator, but I am geting erroneous date
> confirmations, as I am not sure of the format that MC is looking for in
the
> date. Should I request the user input numbers mm/dd/yyyy, or dd/mm/yyyy,
or
> ??? How do I go about specifying the particular format that I want the
users
> to input. Appreciate any help or suggestions. Thanks in advance. Kevin
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> Archives: http://www.mail-archive.com/[email protected]/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>
>


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to