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:

Template Cache problem, bombing WebSTAR problem (2000) newcart (1997) [Webcat 2]Next (1997) Attention all list readers (1997) Frames and WebCat (1997) Running _every_ page through WebCat ? (1997) Itools, WEBCAT OSX (2003) WebCat for News Gathering (1999) [GROUPS] followup (1997) SKU (1997) Submit buttons not working.... (1999) [WebDNA] Shopping cart code debug (2009) WebCat 5 Intranet Question (2003) Error: Can't open order file. (2005) any limitations on # of users.db entries (1999) The Guru Speaks-very long reply (1998) wc 2 pro users - sites, quotes wanted (1997) Secure server question (1997) show related items (2003) Duplicate emails with bcc (2000)