Re: Date in IF ELSE Comparison
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 59963
interpreted = N
texte = Sorry, I copied the code wrong. It should have been a > sign instead of a <in the showif.Erol----- Original Message -----From: "Erol Guneri"
To: "WebDNA Talk" Sent: Wednesday, November 10, 2004 4:02 PMSubject: Re: Date in IF ELSE Comparison> Hi Alan,>> I have the same kind of thing running where we hold voucher expiry dateson> a database. I use the code below and it works for me.>> [search>db=my.db&neexpiry_datedatarq=[blank]&eqvoucher_numdatarq=[vouchnum]&expiry_d> atetype=date]> [foundItems]> [showif [math][Format Days_To_Date][expiry_date][/format]<[DATE][/math]]>> Erol>> ----- Original Message -----> From: "Alan White" > To: "WebDNA Talk" > Sent: Wednesday, November 10, 2004 3:31 PM> Subject: Re: Date in IF ELSE Comparison>>> > WebDna @ Inkblot Media wrote:> >> > > We do this by storing the discount and expiring together in a db. When> > > we check to see if the discouunt code is valid we also check to see if> > > the epiration date is passed todays date. SImple math date check.> > >> > How would I then do this if I had the following in my db (My test> > expired date)> >> > expiryDate> > 01/01/2004> >> > I have the following but it seems to be ignored :-> >> > [if [math]{[date format=%d/%m/%Y]}[/math]>[math]{[expiryDate]}[/math]]> > [then][text]msgError=T_expired[/text][/then]> >> > I have also tried this to no avail:-> >> > [if [date format=%d/%m/%Y]>[expiryDate]]> > [then][text]msgError=T_expired[/text][/then]> >> > Hope someone can tell me where I am going wrong? I don't think I have> > quite got this date thing grasped yet...> >> > TIA> > Alan> >> > -------------------------------------------------------------> > This message is sent to you because you are subscribed to> > the mailing list .> > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to> > > Web Archive of this list is at: http://webdna.smithmicro.com/> >>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> Web Archive of this list is at: http://webdna.smithmicro.com/>>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Sorry, I copied the code wrong. It should have been a > sign instead of a <in the showif.Erol----- Original Message -----From: "Erol Guneri" To: "WebDNA Talk" Sent: Wednesday, November 10, 2004 4:02 PMSubject: Re: Date in IF ELSE Comparison> Hi Alan,>> I have the same kind of thing running where we hold voucher expiry dateson> a database. I use the code below and it works for me.>> [search>db=my.db&neexpiry_datedatarq=[blank]&eqvoucher_numdatarq=[vouchnum]&expiry_d> atetype=date]> [founditems]> [showif [math][Format Days_To_Date][expiry_date][/format]<[date][/math]]>> Erol>> ----- Original Message -----> From: "Alan White" > To: "WebDNA Talk" > Sent: Wednesday, November 10, 2004 3:31 PM> Subject: Re: Date in IF ELSE Comparison>>> > WebDna @ Inkblot Media wrote:> >> > > We do this by storing the discount and expiring together in a db. When> > > we check to see if the discouunt code is valid we also check to see if> > > the epiration date is passed todays date. SImple math date check.> > >> > How would I then do this if I had the following in my db (My test> > expired date)> >> > expiryDate> > 01/01/2004> >> > I have the following but it seems to be ignored :-> >> > [if [math]{[date format=%d/%m/%Y]}[/math]>[math]{[expiryDate]}[/math]]> > [then][text]msgError=T_expired[/text][/then]> >> > I have also tried this to no avail:-> >> > [if [date format=%d/%m/%Y]>[expiryDate]]> > [then][text]msgError=T_expired[/text][/then]> >> > Hope someone can tell me where I am going wrong? I don't think I have> > quite got this date thing grasped yet...> >> > TIA> > Alan> >> > -------------------------------------------------------------> > This message is sent to you because you are subscribed to> > the mailing list .> > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to> > > Web Archive of this list is at: http://webdna.smithmicro.com/> >>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> Web Archive of this list is at: http://webdna.smithmicro.com/>>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Erol Guneri"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Internet Explorer and caching (2000)
CSV import suggestions (2007)
WebDNA CAPTCHA (2008)
Hiding HTML and page breaks (1997)
[OT] Weird Characters (2004)
Bug Report, maybe (1997)
greater than or equal to (1997)
Cross-platform file names? (2000)
PSC recommends what date format yr 2000??? (1997)
Max Record length restated as maybe bug (1997)
Fun with Dates - finally resolved but.... (1997)
Thanks Grant (1997)
WebCat2b15MacPlugin - [protect] (1997)
[WebDNA] Pages dying (2008)
More EudoraPro Email Options (1998)
different show next (1997)
Searching multiple fields from one form field (1997)
(2000)
Append command(2) (2000)
SMSI -- a [notfound] context? (2002)