General information
Category:
Coding, syntax & commands
The following routine will give you a good approximation, but the best unit of mesure is in number of days.
lnDiff = tdSecondDate - tdFirstDate
lnYear = Int(lnDiff / 365)
lnDiff = lnDiff - (lnYear * 365)
lnMonth = Int(lnDiff / 30)
lnDay = lnDiff - (lnMonth * 30)
HTH
>Does anybody have a quick routine that will calculate the number of years, months and days between two given dates? (Taking into account leap years, millenium, etc.)
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only