I have a database that needs to calculate the difference between dates and then tell me how many days, weeks and months are in that range.
For example, I need to know that the difference between May 3 and May 13 is 1 week and 3 days. When I use the datediff function for weeks, it only returns 1 as the value (for the one week).
Likewise, The difference between May 1 and June 10 is 1 month, 1 week and 2 days. Using date diff for month, I only get 1 month returned.
Would anyone know of a function that will return the correct amount of time that I need?
Thank you in advance!
For example, I need to know that the difference between May 3 and May 13 is 1 week and 3 days. When I use the datediff function for weeks, it only returns 1 as the value (for the one week).
Likewise, The difference between May 1 and June 10 is 1 month, 1 week and 2 days. Using date diff for month, I only get 1 month returned.
Would anyone know of a function that will return the correct amount of time that I need?
Thank you in advance!