% = MOD Int() will return a float as a whole number.
-----Original Message----- From: Gabriel Robichaud [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 1:56 PM To: CF-Talk Subject: CFSCRIPT Hey folks. questions regarding scripting. I want to see YY as 0 not 0.25 and i want to use the modulus operator (or modulo, dont know what to call it in english) so i can get the remainder. I dont know what the operator is for cfscript. obvious answer is % but that doesnt work. So how do i get my #resutl# to equal 0 (an integer and not a decimal) and how do i get the remainder of a devision in #remainder#? (see code below for clarification) **********CODE HERE**************************** <cfscript> YY = DateFormat(NOW(), "YY"); result = YY/12; remainder = YY%12; </cfscript> <cfoutput> <Br><BR> The result is : <font size=+4>#result#</font><BR> The remainder is : <font size=+4>#remainder#</font><BR> </cfoutput> **********NO MORE CODE************************** Any thoughts? Thanks Gabriel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

