>
> You need the floor operator:
>
floor() behaves identically to trunc() for positive numbers only; for
negative numbers floor() will round away from zero while trunc() rounds
toward zero. ceil() or ceiling() has the same dual-behavior - though in
reverse compared to floor() - for positive/negative numbers.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Behavior-of-CAST-to-integer-tp5803961p5804105.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.