Re: Date in IF ELSE Comparison

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59991
interpreted = N
texte = Big Thanks to Donovan and Erol :-)) I have managed to get this cracked with a hybrid of the 2 solutions:- [search db=path/to/my.db&eqcodedatarq=[__code]] [if "[numfound]"="0"] [then][text]msgError=1[/text][/then] [else] [founditems] [math]epochnow=[math]{[date format=%d/%m/%Y]}[/math][/math] [math]epochexpire=[math]{[expiryDate]}[/math][/math] [if [epochnow]>[epochexpire]] [then][text]msgError=2[/text][/then] [else] [orderfile cart=[cart]][setheader cart=[cart]]header40=T_[boosterID][/setheader][/orderfile] [replace db=path/to/my.db&eqboosterIDdatarq=[boosterID]]timesUsed=[math][timesUsed]+1[/math][/replace] [/else] [/if] [/founditems] [/else] [/if] [/search] Thanks again... Alan Donovan Brooke wrote: > Just set a date at the top of the page and use that. > > [text]thedate=[date][/text] > > Donovan > > > Alan White wrote: > >> Ahhhh... your final point is a biggie as I have contained this >> process within an orderfile so I can set header40, maybe I should >> implement the orderfile only if the code validates.... >> >> Cheers >> 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/ 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)
Big Thanks to Donovan and Erol :-)) I have managed to get this cracked with a hybrid of the 2 solutions:- [search db=path/to/my.db&eqcodedatarq=[__code]] [if "[numfound]"="0"] [then][text]msgError=1[/text][/then] [else] [founditems] [math]epochnow=[math]{[date format=%d/%m/%Y]}[/math][/math] [math]epochexpire=[math]{[expiryDate]}[/math][/math] [if [epochnow]>[epochexpire]] [then][text]msgError=2[/text][/then] [else] [orderfile cart=[cart]][setheader cart=[cart]]header40=T_[boosterID][/setheader][/orderfile] [replace db=path/to/my.db&eqboosterIDdatarq=[boosterID]]timesUsed=[math][timesUsed]+1[/math][/replace] [/else] [/if] [/founditems] [/else] [/if] [/search] Thanks again... Alan Donovan Brooke wrote: > Just set a date at the top of the page and use that. > > [text]thedate=[date][/text] > > Donovan > > > Alan White wrote: > >> Ahhhh... your final point is a biggie as I have contained this >> process within an orderfile so I can set header40, maybe I should >> implement the orderfile only if the code validates.... >> >> Cheers >> 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/ Alan White

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:

form image (2000) Nesting FoundItem Context (1997) fixed date problem (1997) several .hdr files with one db file? (1999) I have observed and I am gone. (1998) Transferring textareas (1997) Cancel Subscription (1996) WebCat2b15MacPlugin - showing [math] (1997) Ok here is a question? (1997) closedatabases simple question.. (2002) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) Freeze (2003) [BULK] [WebDNA] Anyone using WebDNA7 and Lion Server? (2011) alternatives for WebDNA (2004) Reversed words (1997) Errata: WCS Newbie question (1997) Multiple catalog databases and showcart (1997) RE: Languages (1997) japanese characters (1997) WebCat2: Items xx to xx shown, etc. (1997)