Re: Math confusion

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59346
interpreted = N
texte = That's pretty weird... Here's what I did that works: [math date]{[math date][orig][/math]}+{03/00/0000}[/math]
It looks like WebDNA makes some internal decision base on whether all the operands are inside curly braces for how to treat the {03/00/0000} operand. By converting the numeric date to alphanumeric and putting it in the curlies, WebDNA decides that the 03 means add three months (about 90 days). Otherwise, it decides to add the numeric value of the date 03/00/0000 (treated as 02/28/0000, the day before 03/01/0000 and the 59th day of the year 0000, so it adds 59 days). - brian -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- On Sep 10, 2004, at 2:27 PM, WebDna @ Inkblot Media wrote: > Someone help me out. We are working on a subscription based system > that has > an extend time tool. > > The tool works like this > > Expires: 732129 (07/02/2004) variable = orig > > You can select from 4 times: > 3 months (passes 3) > 6 months (passes 6) > 9 months (passes 9) > 12 months (passes 12) > > These are passed via a select menu. > > I then use them in a math expression. > > [Math][orig]+{[showif[more_time]!12]0[/showif][more_time]/00/0000}[/ > Math] > > This does not work: > > [Math date]732129+{03/00/0000}[/Math] becomes this: 08/30/2004 this > did not > add three months as expected. > > But if I remove the orig variable and use todays date it works. > > [Math date]{[date]}+{03/00/0000}[/Math] becomes this: 12/10/2004 > > Any ideas why this is not working? ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Math confusion ( Kenneth Grome 2004)
  2. Re: Math confusion ( Donovan Brooke 2004)
  3. Re: Math confusion ( Brian Fries 2004)
  4. Math confusion ( "WebDna @ Inkblot Media" 2004)
That's pretty weird... Here's what I did that works: [math date]{[math date][orig][/math]}+{03/00/0000}[/math]
It looks like WebDNA makes some internal decision base on whether all the operands are inside curly braces for how to treat the {03/00/0000} operand. By converting the numeric date to alphanumeric and putting it in the curlies, WebDNA decides that the 03 means add three months (about 90 days). Otherwise, it decides to add the numeric value of the date 03/00/0000 (treated as 02/28/0000, the day before 03/01/0000 and the 59th day of the year 0000, so it adds 59 days). - brian -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- On Sep 10, 2004, at 2:27 PM, WebDna @ Inkblot Media wrote: > Someone help me out. We are working on a subscription based system > that has > an extend time tool. > > The tool works like this > > Expires: 732129 (07/02/2004) variable = orig > > You can select from 4 times: > 3 months (passes 3) > 6 months (passes 6) > 9 months (passes 9) > 12 months (passes 12) > > These are passed via a select menu. > > I then use them in a math expression. > > [math][orig]+{[showif[more_time]!12]0[/showif][more_time]/00/0000}[/ > Math] > > This does not work: > > [Math date]732129+{03/00/0000}[/Math] becomes this: 08/30/2004 this > did not > add three months as expected. > > But if I remove the orig variable and use todays date it works. > > [Math date]{[date]}+{03/00/0000}[/Math] becomes this: 12/10/2004 > > Any ideas why this is not working? ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Brian Fries

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:

WC2.0 Memory Requirements (1997) Merging databases (1997) Searching multiple Databases (1997) WebMerchant 1.6 and https (1997) Missing from Docs [folderName] (1997) [delete] problem (1997) Remote stockroom ? (1998) WebCat2: Items xx to xx shown, etc. (1997) Customer (1998) WebDNA permissions? (2002) WebCommerce: Folder organization ? (1997) Nested tags count question (1997) Separate SSL Server (1997) A Show of Hands - Count WebCat Developers (2002) WebCatalog Plugin: Getting Data Canceled (2000) Number of Line Items (1998) Large sites (2003) Preventing Merchant Settling ? (1997) AOL and [referrer] (2001) 'does not contain' operator needed ... (1997)