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:

Help Encrypt/Decrypt eMail (2003) WebCatalog can't find database (1997) Strange intermittent WebDNA problems Workaround (2008) Virtual Postcards (1998) Security Hole - NetCloak Update (1998) Error.html (1997) Ignoring [OrderFile] context (2005) [convertChars] and HTML Tags (1997) Exclamation point (1997) Running _every_ page through WebCat ? (1997) [WebDNA] Encrypt / Decrypt weirdness..... plus some date weirdness (2015) Sendmail - Pick Mail Server (2004) Uh...can someone help me out with the b10? (1997) search form problem.. (1997) flushdatabases (1997) Date Time Oddness (1999) Version f1 status (1997) [WebDNA] Build Name for 6.1 (2008) Opinion: [input] should be called [output] ... (1997) command line in webDNA 5?! (2003)