daniness - Friday, December 15, 2017 11:30 AM
I'm just curious... why did they select the INT datatype to store dates when the DATE datatype is a byte less, does checking to ensure it's a real date, and easily allows for some date math. INT doesn't allow for any of that directly.
Also, your calculation is a bit confusing... you're using all Integer Math and yet you use the ROUND function. What do you really want to use for the number of days in a month? 30 or 30.416666 or a more proper calculation based on the day of the month?
--Jeff Moden
Change is inevitable... Change for the better is not.