Henry Olive 5 Posted September 11, 2022 Good Day, D-10,3 Edit1.Text := 10,36 MyVariable := 10,36758 I want to change MyVariable to exactly the same as Edit1.Text (10,36) I want to keep just 2 numbers after comma ( , ) Thank You Share this post Link to post
Lajos Juhász 293 Posted September 11, 2022 MyCariable:=trunc(MyCariable*100)/100; Share this post Link to post
David Heffernan 2345 Posted September 11, 2022 What data type are you using? Currency? Share this post Link to post
Henry Olive 5 Posted September 12, 2022 Thank you so much Lajos, David David, yes it is a Currency Share this post Link to post
David Heffernan 2345 Posted September 12, 2022 Then I think the code from @Lajos Juhász is what you need Share this post Link to post
Stano 143 Posted September 15, 2022 It is nicely explained here https://groups.google.com/g/firebird-support/c/gi06-4Uk3Yw Share this post Link to post