Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to calculate true amount of days between dates

Status
Not open for further replies.

tfujino

Programmer
Apr 10, 2001
22
0
0
US
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!
 
See MichaelRed's post in thread701-498444

If his function solves your issue, please give him a star on that post.



HTH,
Bob [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top