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:

Separate SSL Server (1997) Multiple catalog databases and showcart (1997) WebCatalog [FoundItems] Problem - LONG - (1997) greater than or equal to (1997) For those of you not on the WebCatalog Beta... (1997) THANKS (1997) UPS Ratings and Services free package: version 2 available (2000) Wrapping text (1998) [WebDNA] Variable mystery (2009) Announce: Bug fix talk list (1999) Possible Bug in 2.0b15.acgi (1997) the comparison character \ (2000) MacAuthorize hub, no modal password dialog? (1997) Hosting Services (1999) Generating unique SKU from [cart] (1997) [sql] problems in WebCat 4.0 (2000) SHOWIF/HIDEIF empty fields -- OOPS (2005) price carry over (1997) Separate SSL Server (1997) Can't Update records (1997)