FW: ANother SHOWIF problem

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13524
interpreted = N
texte = Let's try this one last time - the snippet I posted yesterday was also wrong (one of these days I'll learn to cut and paste). [math] should be outside the curly braces, like so:[SHOWIF [MATH]{[DATE]}[/MATH]<[MATH]{[MTH]/[DAY]/[YR]}[/MATH]]On sale [MTH]/[DAY]/[YR]
[/SHOWIF]This converts the dates to a number of days and compares them, which should always work correctly.cheers,Marc Eagle StarNine Technologies http://www.smithmicro.com/_______________________________________________________________________________ Michael (and others who were following this) -You've probably already caught this, but Grant corrected me on the WebDNA I sent - it should have been:[SHOWIF {[MATH][DATE][/MATH]}<{[MATH][MTH]/[DAY]/[YR][/MATH]}]On sale [MTH]/[DAY]/[YR]
[/SHOWIF](the [math] context around it IS important).cheers,Marc Eagle StarNine Technologies http://www.smithmicro.com/ _______________________________________________________________________________ Michael ->In my database, I have divided the on sale date of an item into month >(1-12), day (1-31), and year (01-99) fields (for a number of reasons). >If the current date is before the on sale date, I'd like to display some >info (so anything past September 16th will display the on sale date). >For some reason, the following code (which is inside a [SEARCH] context) >*always* displays the on sale date. >[SHOWIF [MATH][DATE][/MATH]<[MATH]{[MTH]/[DAY]/[YR]}[/MATH]]On sale >[MTH]/[DAY]/[YR]
[/SHOWIF] >My date pref is set to %m/%d/%Y >I've tried it with WebCat 2.0 and 2.01. >The clock on the web server is correct.Try this instead:[SHOWIF {[DATE]}<{[MTH]/[DAY]/[YR]}]On sale [MTH]/[DAY]/[YR]
[/SHOWIF]It appears to work for me.Hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. FW: ANother SHOWIF problem (Marc Eagle 1997)
  2. FW: ANother SHOWIF problem (Marc Eagle 1997)
Let's try this one last time - the snippet I posted yesterday was also wrong (one of these days I'll learn to cut and paste). [math] should be outside the curly braces, like so:[SHOWIF [math]{[date]}[/MATH]<[math]{[MTH]/[DAY]/[YR]}[/MATH]]On sale [MTH]/[DAY]/[YR]
[/SHOWIF]This converts the dates to a number of days and compares them, which should always work correctly.cheers,Marc Eagle StarNine Technologies http://www.smithmicro.com/_______________________________________________________________________________ Michael (and others who were following this) -You've probably already caught this, but Grant corrected me on the WebDNA I sent - it should have been:[SHOWIF {[math][date][/MATH]}<{[math][MTH]/[DAY]/[YR][/MATH]}]On sale [MTH]/[DAY]/[YR]
[/SHOWIF](the [math] context around it IS important).cheers,Marc Eagle StarNine Technologies http://www.smithmicro.com/ _______________________________________________________________________________ Michael ->In my database, I have divided the on sale date of an item into month >(1-12), day (1-31), and year (01-99) fields (for a number of reasons). >If the current date is before the on sale date, I'd like to display some >info (so anything past September 16th will display the on sale date). >For some reason, the following code (which is inside a [search] context) >*always* displays the on sale date. >[SHOWIF [math][date][/MATH]<[math]{[MTH]/[DAY]/[YR]}[/MATH]]On sale >[MTH]/[DAY]/[YR]
[/SHOWIF] >My date pref is set to %m/%d/%Y >I've tried it with WebCat 2.0 and 2.01. >The clock on the web server is correct.Try this instead:[SHOWIF {[date]}<{[MTH]/[DAY]/[YR]}]On sale [MTH]/[DAY]/[YR]
[/SHOWIF]It appears to work for me.Hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ Marc Eagle

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:

WebCat/CyberStudio Compatibility (1998) Changes to the List (1997) I'm tired of all this! (2000) [OT] ODBC between IIS and remote Access problem (2000) RE: 2nd WebCatalog2 Feature Request (1996) Redirect (2000) Nesting format tags (1997) Emailer setup (1997) Help with number searching (1999) cc auth with [purchase] (1998) quitting (1997) Help formatting search results w/ table (1997) Problems appending to database (1997) the dreaded unitShipCost (2003) Multiple prices (1997) too many nested [xxx] (1997) Editing only the price field in the database (1998) Ready,Set; Print! (1999) Help formatting search results w/ table (1997) [HIDEIF] inside [FOUNDITEM] (1997)