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:
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
Dark Horse Comics success story (1997)
Listfiles not listing mounted volume (2002)
NT BETA BUG???? (1997)
Problems with SELECT MULTIPLE (1999)
[format 40s]text[/format] doesn't work (1997)
time and welcome (1999)
Session ID Equivalent (2003)
mac os HOG? (2001)
page chokes on hideif when false and ignored (1998)
Looking For WebCatalog Migration Assistance (2003)
Configuring E-mail (1997)
For those of you not on the WebCatalog Beta... (1997)
[WebDNA] ReturnRAW problem with Safari (2015)
Web Catalog 2 demo (1997)
WebDNA + MLS (2006)
Webcat and logging (1998)
Hard Questions ? (1997)
[append] vs. [appendfile] delta + question? (1997)
wish list (2002)