Format problem

ArturAs

New Member
Licensed User
Why does Format(0.567,"F0") return 1? I would expect 0

The value seems to be rounded before formatting:
Format(0.467,"F0") brings 0

Artur
 

specci48

Well-Known Member
Licensed User
Longtime User
It's true that the format function rounds the value before formatting.

Why does Format(0.567,"F0") return 1? I would expect 0

So what is the aim of your expected format? If you want only the value before the decimal point use
Int(0.567) => returns 0
Int(0.467) => returns 0
Int(1.000) => returns 1


specci48
 
Top