Good morning group,
I need to get months differences but with days precision. Let's say we have an employee with a Service Date of May 21 1999, if my reference date is May 8 2004, I need to return a value of 59 months. Only when I'll reach the date of May 21 2004 should I get a value of 60.
I'm on Sybase and I use the built-in datediff function, but this function just doesn't care about the day. datediff (mm, 'May 21 1999', 'May 08 2004') returns 60 and that's not what I want.
I'm about to try the CASE function to get my result. Something like: If Day2 < Day1 then Months = Months - 1, but there must be a straightforward way of getting that 59...?
TIA.
Hugo.
I need to get months differences but with days precision. Let's say we have an employee with a Service Date of May 21 1999, if my reference date is May 8 2004, I need to return a value of 59 months. Only when I'll reach the date of May 21 2004 should I get a value of 60.
I'm on Sybase and I use the built-in datediff function, but this function just doesn't care about the day. datediff (mm, 'May 21 1999', 'May 08 2004') returns 60 and that's not what I want.
I'm about to try the CASE function to get my result. Something like: If Day2 < Day1 then Months = Months - 1, but there must be a straightforward way of getting that 59...?
TIA.
Hugo.