Doh! Still thinking of some features in D5 mode.
Colin's method is much cleaner.
Sorry 'bout the confusion.
- jp
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of jp
Sent: Tuesday, June 05, 2001 2:26 PM
To: [EMAIL PROTECTED]
Subject: RE: <lingo-l> Verifying a date object falls between a certain
date range
If you need to evaluate for a more specific date
(Say you want to expire something on a given date)
You can use a piece of Lingo like this to break out
each element of your date object and then evaluate
against it.
on checkDate me
mOldDelimiter = the itemdelimiter
mDelimiter = "/"
the itemdelimiter = mDelimiter
-- the date you need to evaluate
tDay = 5
tMonth = 6
tYear = 00
-- get current date
mDate = the date
-- break it out
mMonth = item 1 of mDate
mDay = item 2 of mDate
mYear = item 3 of mDate
-- after the above you can evaluate as desired
if mDay = value(tDay) then
put "Expired !"
end if
-- set the delimiter back to default
the itemDelimiter = mOldDelimiter
end
- jp
---------------------
J.Powers
Androidmedia
[EMAIL PROTECTED]
---------------------
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Colin Holgate
Sent: Tuesday, June 05, 2001 1:57 PM
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> Verifying a date object falls between a certain
date range
>Can anyone suggest a way of checking if a date object falls within a
>predetermined date range?
Just test with < and >:
put the systemdate < date(2001,6,7) and the systemdate > date(2001,6,5)
-- 0
Tomorrow this would return a 1.
--
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]