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!

Month calculation from given period

Status
Not open for further replies.

giridpi

Programmer
Dec 5, 2003
33
0
0
IN
I want calculate month nd days from the given period. for example 30/06/1996 to 20/03/2004 in foxpro 2.6 dos.
Please any one guide me

Thank u

Giri
 
If you have:
mdDate1 = {06/30/1996} && MM/DD/YYYY
mdDate2 = {03/20/2004}

Then:
mnDays = mdDate2 - mdDate1

As far as breaking the mnDays down into Months + Days, you will need to write a routine to do that.

I think that there might be a previous posting with code to do that, but you will need to use the Keyword Search to find it.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Hi,

See the post by Ramani from the VFP forum:

Convert days into months
thread184-242345

You could easily change it to the function you need.
 
Here is another thread from the VFP forum:

Help calculate age in years and number months between two dates
thread184-805512
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top