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:

numlineitems possible cache problem. (2000) strangness with the form