"Is A Date" Question

Jan Schenkel janschenkel at yahoo.com
Wed Sep 24 13:46:00 EDT 2003


--- "Dom" <mcdomi at free.fr> wrote:
> I go with a question about "is a date" problem.
> As my stack goes with customized date format, I
> want to insure that the
> user (me, for instance) entered a valid date...
> 
> I may be wrong, but it seems that the question "
> is a date" is true ONLY
> with the standard US-english date format

It's an old problem, indeed ; but I found that you
could try something like this :
--
on closeField
  put the text of me into tDate
  convert tDate from system date to date
  if the result is not empty then
    answer error \
           "Please enter a date in the format :" && \
           the short system date
    select text of me
  else pass closeField
end closeField
--

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the use-livecode mailing list