0

I'm using GETDATE()) / 362.25 AS [AGE] to calculate someone's age. However, the output of the age column is e.g. 68.080055.

How am I able to round this so that I have no decimal places?

Many thanks, Jon

  • Where are you that the divisor is 362.25? – Gordon Linoff Feb 27 '20 at 11:40
  • 1
    Why not just use one of many solutions findable by searching this site for `age from dob sql server` or similar, rather than trying to reinvent this yourself? – Damien_The_Unbeliever Feb 27 '20 at 11:41
  • If your question is simply how to find the floor of `68.080055`, just use `FLOOR`: `PRINT FLOOR(68.080055)`. However, as others have noted your age calculation seems a bit strange! – Martin Feb 27 '20 at 11:42
  • Thanks all. I found the divisor on another forum somewhere, so I simply used that. I'm more than happy to use something different, and I'll do a search on here as suggested. –  Feb 27 '20 at 11:51

0 Answers0