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:
Bug - 4.5 (2002)
3 fields must match (2004)
Some Advise needed (1997)
When do we get to request new features? (1999)
Merchant account (1998)
RE: [sendmail]- bcc? (1998)
newbies to web, spaces in email address (1998)
Make sure I understand this??? (1997)
Problems getting parameters passed into email. (1997)
How to display images? (2002)
[OT] Xserve (2002)
[WebDNA] New problem with [ShowNext] (2010)
WebCatalog books and othre resources (2001)
[closeDataBase myDataBase.db] not working? (1997)
Nested tags count question (1997)
TABLE (2003)
WebCat2_Mac RETURNs in .db (1997)
Problems with [Applescript] (1997)
syntax question, not in online refernce (1997)
updating with ProductEditor (1998)