Re: decimals and variables
Cool. I'm in London. Was working in K-W for a while, but back in the forest city. I've always wanted to visit NS but it just never seems to happen. It looks beautiful. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342122 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: decimals and variables
I used to live in Kitchener back in 2006. You gas prices are cheaper than ours though! The gov didn't mention how long "temporary" was! -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Thursday, February 10, 2011 10:43 AM To: cf-talk Subject: Re: decimals and variables I come a close second. I'm in ON. Damn you Harper! Remember in the 80's when the GST was a temporary measure? On Thu, Feb 10, 2011 at 9:38 AM, Rick Sanders wrote: > > Yup, I certainly am! Paying the highest taxes in North America! lol! > > -Original Message- > From: Michael Grant [mailto:mgr...@modus.bz] > Sent: Thursday, February 10, 2011 10:33 AM > To: cf-talk > Subject: Re: decimals and variables > > > Does this mean you are in Nova Scotia? > > > On Thu, Feb 10, 2011 at 9:14 AM, Rick Sanders wrote: > > > > > Hey all, > > > > > > > > I'm pulling up an integer from the database which is 15. > > > > > > > > This is a tax rate, so I need to get the tax on the subtotal. Say the > > #subtot# is 100 and #tx# is 15. > > > > > > > > This should bring back the number 15. However, cf is throwing an error > > because of the decimal in front of the #tx#. > > > > > > > > > > > > This works. However I need to pull from the database in case the tax rate > > changes. > > > > > > > > Rick > > > > > > > > > > > > > > > > > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342111 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: decimals and variables
I come a close second. I'm in ON. Damn you Harper! Remember in the 80's when the GST was a temporary measure? On Thu, Feb 10, 2011 at 9:38 AM, Rick Sanders wrote: > > Yup, I certainly am! Paying the highest taxes in North America! lol! > > -Original Message- > From: Michael Grant [mailto:mgr...@modus.bz] > Sent: Thursday, February 10, 2011 10:33 AM > To: cf-talk > Subject: Re: decimals and variables > > > Does this mean you are in Nova Scotia? > > > On Thu, Feb 10, 2011 at 9:14 AM, Rick Sanders wrote: > > > > > Hey all, > > > > > > > > I'm pulling up an integer from the database which is 15. > > > > > > > > This is a tax rate, so I need to get the tax on the subtotal. Say the > > #subtot# is 100 and #tx# is 15. > > > > > > > > This should bring back the number 15. However, cf is throwing an error > > because of the decimal in front of the #tx#. > > > > > > > > > > > > This works. However I need to pull from the database in case the tax rate > > changes. > > > > > > > > Rick > > > > > > > > > > > > > > > > > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342108 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: decimals and variables
Yup, I certainly am! Paying the highest taxes in North America! lol! -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Thursday, February 10, 2011 10:33 AM To: cf-talk Subject: Re: decimals and variables Does this mean you are in Nova Scotia? On Thu, Feb 10, 2011 at 9:14 AM, Rick Sanders wrote: > > Hey all, > > > > I'm pulling up an integer from the database which is 15. > > > > This is a tax rate, so I need to get the tax on the subtotal. Say the > #subtot# is 100 and #tx# is 15. > > > > This should bring back the number 15. However, cf is throwing an error > because of the decimal in front of the #tx#. > > > > > > This works. However I need to pull from the database in case the tax rate > changes. > > > > Rick > > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342107 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: decimals and variables
Does this mean you are in Nova Scotia? On Thu, Feb 10, 2011 at 9:14 AM, Rick Sanders wrote: > > Hey all, > > > > I'm pulling up an integer from the database which is 15. > > > > This is a tax rate, so I need to get the tax on the subtotal. Say the > #subtot# is 100 and #tx# is 15. > > > > This should bring back the number 15. However, cf is throwing an error > because of the decimal in front of the #tx#. > > > > > > This works. However I need to pull from the database in case the tax rate > changes. > > > > Rick > > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342105 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: decimals and variables
Thank you. this worked great. I didn't realize you had to convert it to a decimal in cf. -Original Message- From: DURETTE, STEVEN J (ATTASIAIT) [mailto:sd1...@att.com] Sent: Thursday, February 10, 2011 10:24 AM To: cf-talk Subject: RE: decimals and variables You need to do this: This actually converts the tx to a decimal. Also you don't need the #s in the cfset. :) Steve -Original Message- From: Rick Sanders [mailto:c...@webenergy.ca] Sent: Thursday, February 10, 2011 9:14 AM To: cf-talk Subject: decimals and variables Hey all, I'm pulling up an integer from the database which is 15. This is a tax rate, so I need to get the tax on the subtotal. Say the #subtot# is 100 and #tx# is 15. This should bring back the number 15. However, cf is throwing an error because of the decimal in front of the #tx#. This works. However I need to pull from the database in case the tax rate changes. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342104 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: decimals and variables
You need to do this: This actually converts the tx to a decimal. Also you don't need the #s in the cfset. :) Steve -Original Message- From: Rick Sanders [mailto:c...@webenergy.ca] Sent: Thursday, February 10, 2011 9:14 AM To: cf-talk Subject: decimals and variables Hey all, I'm pulling up an integer from the database which is 15. This is a tax rate, so I need to get the tax on the subtotal. Say the #subtot# is 100 and #tx# is 15. This should bring back the number 15. However, cf is throwing an error because of the decimal in front of the #tx#. This works. However I need to pull from the database in case the tax rate changes. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342102 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: decimals and variables
why not do #myquery.taxrate/100#? On Thu, Feb 10, 2011 at 8:14 AM, Rick Sanders wrote: > > Hey all, > > > > I'm pulling up an integer from the database which is 15. > > > > This is a tax rate, so I need to get the tax on the subtotal. Say the > #subtot# is 100 and #tx# is 15. > > > > This should bring back the number 15. However, cf is throwing an error > because of the decimal in front of the #tx#. > > > > > > This works. However I need to pull from the database in case the tax rate > changes. > > > > Rick > > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342101 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: decimals and variables
>>This is a tax rate, so I need to get the tax on the subtotal. >> Have you tried ? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342100 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: decimals and variables
divide tx by 100 before using, rather than trying that trick with the decimal point. (this will also work better for the value of "4", which in your example would evaluate to .40 rather than .04. Jerry Milo Johnson On Thu, Feb 10, 2011 at 9:14 AM, Rick Sanders wrote: > > Hey all, > > > > I'm pulling up an integer from the database which is 15. > > > > This is a tax rate, so I need to get the tax on the subtotal. Say the > #subtot# is 100 and #tx# is 15. > > > > This should bring back the number 15. However, cf is throwing an error > because of the decimal in front of the #tx#. > > > > > > This works. However I need to pull from the database in case the tax rate > changes. > > > > Rick > > > > > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342099 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm