re: date search problem

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24002
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:

404 error -- but wc code executes... (2001) Dates, Math, and Sandboxes (2003) MS Access data conversion (2001) Odd request (2003) This Code Kills My WebCatalog Dead (2003) New syntax feedback for 4.0 (2000) 2.0 Info (1997) [WebDNA] Video Request: "Faces of WebDNA" (2010) Sorting by date (1997) WebDelivery downloads alias, not original ? (1997) re:check boxes (1997) [OT] Mail Error code 573?? (2006) Error Lob.db records error message not name (1997) RE: Webcatalog and CyberSTUD (1998) Notepad problems (1998) Problems w/ heavy use of cart header fields? (1998) Problems with Frames (1998) Price Not Appearing (2000) Creating main- and sub-category search (1997) Error - Search / Showif (2000)