re: date search problem

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24003
interpreted = N
texte = Assuming you don't want to change the database.... Yes I'm sure you can solve the problem in WebCatalog (as long as you're using version 3.X).Here's a snippet that may get you started. The snippet doesn't solve your whole problem but it does the following: 1. Removes the date from the string; 2. Figures out how many days there are in total including show and dark days; loops through the days to show when the show is on or off.[text]firstcut=[middle startafter=:&endbefore=2]1-1-99:1101111[/middle][/text] [text]mycounter=[countchars][text]firstcut[/text][/countchars][/text]

[loop start=1&end=[text]mycounter[/text]&advance=1] [showif 1=[getchars start=[index]&end=[index]][text]firstcut[/text][/getchars]]Show On

[/showif] [showif 0=[getchars start=[index]&end=[index]][text]firstcut[/text][/getchars]]No Show

[/showif] [/loop]If this helps and you need more just ask. Interesting problem. Regards,Al Booth (web designer)Want to see lots of interesting WebCat sites? Check my index at www.interlog.com/~albooth. Associated Messages, from the most recent to the oldest:

    
  1. re: date search problem (Allen Booth 1999)
  2. re: date search problem (Allen Booth 1999)
Assuming you don't want to change the database.... Yes I'm sure you can solve the problem in WebCatalog (as long as you're using version 3.X).Here's a snippet that may get you started. The snippet doesn't solve your whole problem but it does the following: 1. Removes the date from the string; 2. Figures out how many days there are in total including show and dark days; loops through the days to show when the show is on or off.[text]firstcut=[middle startafter=:&endbefore=2]1-1-99:1101111[/middle][/text] [text]mycounter=[countchars][text]firstcut[/text][/countchars][/text]

[loop start=1&end=[text]mycounter[/text]&advance=1] [showif 1=[getchars start=[index]&end=[index]][text]firstcut[/text][/getchars]]Show On

[/showif] [showif 0=[getchars start=[index]&end=[index]][text]firstcut[/text][/getchars]]No Show

[/showif] [/loop]If this helps and you need more just ask. Interesting problem. Regards,Al Booth (web designer)Want to see lots of interesting WebCat sites? Check my index at www.interlog.com/~albooth. Allen Booth

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:

Re1000001: Setting up shop (1997) [sendmail] and [formvariables] (1997) Navigator 4.01 (1997) Robust WebDNA Job Manager / Accountant (2006) Passing [quantity] (2000) Strange WebDNA server not running error (2006) FM PRO Compatibility Issue - Single Database w/o Conversions (1997) Need relative path explanation (1997) Duplicate Cart Problem in Netscape (2000) I'm new be kind (1997) Search Command, multiple dbs, etc. --further elucidation needed (2000) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) [CART] inside a [LOOP] (1997) Search/sort in URL Was: GuestBook example (1997) Uh...can someone help me out with the b10? (1997) [taxRate] [TaxTotal] ? (1997) [WebDNA] test (2009) Credit Card Checksum (1997) Code database (1998) Extended [ConvertChars] (1997)