Home » SQL & PL/SQL » SQL & PL/SQL » Getting rid of decimals in the date
Getting rid of decimals in the date [message #1597] Wed, 15 May 2002 08:48 Go to next message
Dave
Messages: 92
Registered: August 1999
Member
When I subtract a date from the sysdate and divide by 365 to get the number of years I get 7 decimal places which I don't want. How do I get rid of them?
example
(sysdate-date)/365

result 29.9844884
Re: Getting rid of decimals in the date [message #1598 is a reply to message #1597] Wed, 15 May 2002 09:12 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
user functions like round,ceil, floor or anything u want.
1* select round(24.274234) from dual
SQL> /

ROUND(24.274234)
----------------
24
Previous Topic: internet app: handling error messages
Next Topic: Can't copy a row because it contains long raw column
Goto Forum:
  


Current Time: Fri May 03 11:12:07 CDT 2024