Board index » delphi » Integer value of a Double
Franky Brandt
Delphi Developer |
Integer value of a Double2005-10-04 03:47:05 AM delphi37 Hi all Silly question, but need this asap.., I need to get the integer value of a double precision field in a stored procedure. Sure, i can do a Cast .. as Integer, or just assign the value to a Integer variable, or use F_Truncate, or maybe even ABS function. But all these functions will round the integer, if i for instance have 11,20 and do a cast I will have 11, if i have 11.55 and do a cast I will have 12. That's the problem I am facing, i need to get the first part without being round, no matter what the decimal value is. I'm considering using substring functions but that seems so overdoing things. Any recommendations please?, i need to solve this very soon I should have payed more attention during math class :p Franky |