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:

Error Lob.db records error message not name (1997) [numfound] in nested [search] (2000) 2.0 Info (1997) WebMerchant Question (1998) Number of Open Databases (1998) Email within tmpl ? (1997) Converting DOS database (2000) [OT] OSX 3D-Secure support (2006) 2nd try... any mysql users in the house? (2007) UPS online tools assuming one package per item no matterthequantity. (2003) Latin Characters (1998) A Global Variable (1997) Trouble with formula.db (1997) ImageMap (1997) UK credit card info follow-up (1997) OT - good CC processor(s)? (1999) Online reference (1997) SiteGuard Use Question (1997) b12 cannot limit records returned and more. (1997) Any help gratefully appreciated (2001)