Re: Date in IF ELSE Comparison

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59965
interpreted = N
texte = Alan, what are the values comming through as? Do something like this instead: [math]epochnow=[math]{[date format=%d/%m/%Y]}[/math][/math] [math]epochexpire=[math]{[expiryDate]}[/math][/math] [if epochnow>epochexpire] [then][text]msgError=T_expired[/text][/then] [msgError] Then you will see all of your values (then just add "show=F" to your set math vars when its working. Also make sure that the date is not inside an orderfile context. Donovan Alan White wrote: > 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 -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <- Graphic Design, Custom Tags and Labels -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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)
Alan, what are the values comming through as? Do something like this instead: [math]epochnow=[math]{[date format=%d/%m/%Y]}[/math][/math] [math]epochexpire=[math]{[expiryDate]}[/math][/math] [if epochnow>epochexpire] [then][text]msgError=T_expired[/text][/then] [msgError] Then you will see all of your values (then just add "show=F" to your set math vars when its working. Also make sure that the date is not inside an orderfile context. Donovan Alan White wrote: > 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 -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <- Graphic Design, Custom Tags and Labels -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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/ Donovan Brooke

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:

Recalculating Shipping Costs (1997) [WebDNA] 6.2 Monitor (2012) Add a field to the error log? (1997) FREE Web Server Monitor FREE (1997) Refresh cart# (1999) Mac v. NT (1998) Another question about credit cards (1997) Possible Bug in 2.0b15.acgi (1997) Another Search Question (2003) How To question on setting up downloads (1997) ConvertCharacters (2000) NT considerations (1997) database size? (1997) Re:[off] Promotions Co? (1997) Running _every_ page through WebCat ? (1997) Trouble with formula.db (1997) Weird G3 Happenings. (1998) Plugin or CGI or both (1997) searchable list archive (1997) upgrade? (1997)