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:

Re:Searching for ALL / empty form field *the FINAL answer* (1997) [WebDNA] WebDNA 7 (2011) Running 2 two WebCatalog.acgi's (1996) Server Freeze (1998) Any news on WebDNA on Intel OSX? (2006) Solve the Problem, get the code! (2001) authenticating a second user (1997) [WaitForFile] wait for open file, not closed file (2001) Nested Lookups (1998) searching more then one (1999) Hiding an absolute link to a download (2002) Troubles with Selection Drop Down List Search (1998) Another question about credit cards (1997) 2.0Beta Command Ref (can't find this instruction) (1997) Error Log.db --however (1997) Date Range Issue (2006) What file? (1997) WebCat2b15MacPlugin - showing [math] (1997) how does [break] work? (1998) Cart -> Date and Time (2004)