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:
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:
Navigator 4.0 & tables (1997)
emailer w/F2 (1997)
Dummy Credit Card Number for debug? (1997)
Syntax of a URL for including ?cart=[cart] and #something? (1998)
Donovans Theorem (2003)
[cart] how is it generated (2002)
Off-Topic: Optimal WebSTAR settings for WebDNA plugin v4.5 (2002)
Stumpted Again (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Great product and great job ! (1997)
users.db (1999)
WebCatalog for Postcards ? (1997)
Further tests with the infamous shipCost (1997)
Non-Cart Files in Shopping Cart Folder (1997)
More questions about serial number dishing (1997)
2.1b3 --> way slow (1997)
[WebDNA] Froala Editor working with WebDNA (2016)
Credit Card processing (1998)
Error with [applescript] (1999)
PCS Frames (1997)