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:
how do we turn off staticpages page creation? (2003)
Help name our technology! (1997)
Need relative path explanation (1997)
help testing quicktime delivery (1997)
Saving/Looking Up customer numbers (1998)
MacAuthorize hub, no modal password dialog? (1997)
So many lookers, hey smith micro (2003)
Has this happened to you? (was:Emailer Chokes on bad address) (1997)
Bug? (1997)
WebDNA install - linux (permissions rehash?) (2002)
security problem (1997)
Wrapping text (1998)
I'm tired of all this! (2000)
WebCat2: Items xx to xx shown, etc. (1997)
Accepting Credit Cards Online (1999)
WC Host Needed (2000)
Ready,Set; Print! (1999)
Text data with spaces in them... (1997)
OS Limitations (1998)
RE: Suggestions for Topics to be covered in an Advanced WebDNACourse... (1998)