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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get number of months between two dates

Status
Not open for further replies.

ziziak

Programmer
Jul 13, 2007
11
SK
How can I get number of months between two dates crossing the year?
 
need months difference, f.e. Dec 2006 - Feb 2007 = 3 months
 
Are you planning to do some work or just waiting for some to code it? Use milliseconds per month instead of milliseconds per day.

Cheers,
Dian
 
you sure that MILLSECS_PER_Month is constant?
 
you sure that MILLSECS_PER_Month is constant?

Don't see how it can be since there are a variable number of days in a month. Plus daylight saving may play havoc with millisecond differentials between dates.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top