is a date broke?
Jim Ault
JimAultWins at yahoo.com
Tue May 1 17:26:02 EDT 2007
I guess I would start with a couple assumptions:
filter with "*/*/*" --> is not empty
collect a string that contains only the valid date chars "/-0123456789"
decide if spaces end the loop (eg word 1, 2, 3)
--perhaps repeat for each word WRD
--until at least "d/d/dd" was found, then exit repeat
or
replace "-" with "/" in input
?? replace " " with empty in input
set the itemdel to "/"
check word -1 of item 1 of input
try
put word -1 of item 1 of input * 1 into mmm
catch
answer "invalid month entry"
exit to top
end try
try
put word 1 of item 3 of input * 1 into yyy
catch
answer "invalid year entry"
exit to top
end try
etc.... depends on what you will allow, and also consider European date
order.
Jim Ault
Las Vegas
On 5/1/07 2:09 PM, "Chipp Walters" <chipp at chipp.com> wrote:
> Thanks Jim,
> I don't see anything there which can help me:
>
> If I try the numericDate function:
> put numericDate("01/01/01 hello dog")
> I get:
> 01/01/01 hello dog00
>
> Any other ideas?
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list