So funny that you ask this right now. Just yesterday I had to do this!!! It was a text column where they were typing in fractions and it needed to be converted to decimals so we could do math with it. I spent about 5 seconds thinking of a formula to do it, but in my case there were only 7 possibilities (all were in 8ths) so I just did 7 update commands.... I will keep your formula for the future!! Very clever!
Karen -----Original Message----- From: Bruce Chitiea <[email protected]> To: [email protected] <[email protected]> Sent: Tue, Dec 15, 2020 3:51 pm Subject: [RBASE-L] - Convert TEXT fraction to DOUBLE decimal value #yiv3700363170 #yiv3700363170x157c5d676597468 #yiv3700363170xce0a6bc6429748f68a1fbd60505e23fd, #yiv3700363170 #yiv3700363170x157c5d676597468 #yiv3700363170xce0a6bc6429748f68a1fbd60505e23fd #yiv3700363170x0ffa9ca747a0444 #yiv3700363170x5341b55c703f4d708da1fcccafdd6cf1, #yiv3700363170 #yiv3700363170x157c5d676597468 #yiv3700363170x86b4dd35dfc94ef5a5432fdb70f5f643{font-family:'Segoe UI';font-size:12pt;}#yiv3700363170 blockquote.yiv3700363170cite {margin-left:5px;margin-right:0px;padding-left:10px;padding-right:0px;border-left:1px solid #cccccc;}#yiv3700363170 blockquote.yiv3700363170cite2 {margin-left:5px;margin-right:0px;padding-left:10px;padding-right:0px;border-left:1px solid #cccccc;margin-top:3px;padding-top:0px;}#yiv3700363170 a img {border:0px;}#yiv3700363170 All: Has anyone a more elegant way to convert TEXT fractional values to DOUBLE decimal values: SET VAR vHumpty TEXT = '7/8' SET VAR vDumpty DOUBLE = (FLOAT ( ( NINT(SSUBCD(.vHumpty,1,'/' ) ) ) / (NINT(SSUBCD(.vHumpty,2,'/' ) ) ) ) ) SHOW VAR vDumpty ... 0.875 Something in loco parentheses would be great! Thoughts? Bruce Bruce A. ChitieaSafeSectors, Inc.-----------------------------------112 Harvard Ave #272Claremont CA 91711-4716-----------------------------------rby...@safesectors.com-----------------------------------+011 (909) 238-9012 c+011 (909) 912-8678 f -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/em534fa79d-aca0-4bdb-8e46-79692927c094%40pathfinder. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/174695635.879682.1608072876116%40mail.yahoo.com.

