Re: [SHOWIF] PROBLEM
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 27260
interpreted = N
texte = and UnixContent-type: text/plain; charset=US-ASCIIContent-transfer-encoding: 7bitNatalie M. Rezonoff @ natasha@shani.net wrote:> sku title enddate> 1 product1 02/02/2000> 2 product2 01/08/2001> > I am trying to do the following:> > [showif [date]<[enddate]] [title] [/showif]> > this does not work because the showif treats the date as number and not as> date, therefore,> 01/08/2001 is smaller than 02/02/2000.> > Is there a solution for that?Yes, store dates ALWAYS as numbers in your .db files. Then you can easilycompare with showif/hideif and make any calculations.To store them as numbers you can use this:[math show=f]numberdate={[date]}[/math]and to get them back as date formated use this:[format days_to_date %m/%d/%Y][numberdate][/format]Hope this helps.Sincerely,Nitai--E-Commerce Solutions for Unix, NT and MacEyework - http://eyework.ch/EMail: Info@eyework.chTel: +41 (0)52 / 654 15 55, Fax: +41 (0)52 / 654 15 59-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to
.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
Associated Messages, from the most recent to the oldest:
and UnixContent-type: text/plain; charset=US-ASCIIContent-transfer-encoding: 7bitNatalie M. Rezonoff @ natasha@shani.net wrote:> sku title enddate> 1 product1 02/02/2000> 2 product2 01/08/2001> > I am trying to do the following:> > [showif [date]<[enddate]] [title] [/showif]> > this does not work because the showif treats the date as number and not as> date, therefore,> 01/08/2001 is smaller than 02/02/2000.> > Is there a solution for that?Yes, store dates ALWAYS as numbers in your .db files. Then you can easilycompare with showif/hideif and make any calculations.To store them as numbers you can use this:[math show=f]numberdate={[date]}[/math]and to get them back as date formated use this:[format days_to_date %m/%d/%Y][numberdate][/format]Hope this helps.Sincerely,Nitai--E-Commerce Solutions for Unix, NT and MacEyework - http://eyework.ch/EMail: Info@eyework.chTel: +41 (0)52 / 654 15 55, Fax: +41 (0)52 / 654 15 59-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Nitai
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:
Archive (Zip, Sit, Tgz) (2004)
Changes to the List (1997)
[OT] 'Email this story to a friend' (2003)
Search results problem (2003)
[isfolder] and [filename] (1997)
PIXO (1997)
Re:2nd WebCatalog2 Feature Request (1996)
RAM variables (1997)
WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)
Bug Report, maybe (1997)
Checkboxes (1998)
[ModDate] & [ModTime] ? (1997)
[TaxableTotal] - not working with AOL and IE (1997)
Stats (2004)
WebDNA HitLogger available (was Signal Raised Error) (1997)
autosensing lanague selection (1997)
lookups or math? (1998)
HTML Editors (1997)
[WebDNA] PCI Vulnerability testing (2009)
WebCat2b12plugin - [search] is broken ... not! (1997)