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 PM Subject: Re: Date in IF ELSE Comparison > Hi Alan, > > I have the same kind of thing running where we hold voucher expiry dates on > 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:

    
  1. Re: Date in IF ELSE Comparison ( Alan White 2004)
  2. Re: Date in IF ELSE Comparison ( Donovan Brooke 2004)
  3. Re: Date in IF ELSE Comparison ( Alan White 2004)
  4. Re: Date in IF ELSE Comparison ( Donovan Brooke 2004)
  5. Re: Date in IF ELSE Comparison ( "Erol Guneri" 2004)
  6. Re: Date in IF ELSE Comparison ( "Erol Guneri" 2004)
  7. Re: Date in IF ELSE Comparison ( Alan White 2004)
  8. Re: Date in IF ELSE Comparison ( "WebDna @ Inkblot Media" 2004)
  9. Re: Date in IF ELSE Comparison ( Alan White 2004)
  10. Re: Date in IF ELSE Comparison ( Donovan Brooke 2004)
  11. Re: Date in IF ELSE Comparison ( Alan White 2004)
  12. Re: Date in IF ELSE Comparison ( Donovan Brooke 2004)
  13. Date in IF ELSE Comparison ( Alan White 2004)
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 PM Subject: Re: Date in IF ELSE Comparison > Hi Alan, > > I have the same kind of thing running where we hold voucher expiry dates on > 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:

[WebDNA] WebDNA crash and now emailer not working (2009) Re:Merging databases (1997) POS (2000) Adult Hosting (2001) Banners and sort of random display (1997) deadlock (2000) my price won't move (1997) Popup Menu Options (1998) RE: protect tag on NT (1997) Search in 2 or more catalogs (1997) [lookup] [search] Issue (2005) Search bug. Help (2002) Plugin or CGI or both (1997) request for new command (1997) Re[2]: 2nd WebCatalog2 Feature Request (1996) WebCatalog Technical Reference (1997) cart info (1998) ACGI processing for .html (1997) WebDelivery downloads alias, not original ? (1997) Who needs Yoda! (2002)