>>Hello Experts!
>>
>>I want to find the number of days and month from from a range of date. Here is my problem:
>>
>>I have two date(british date);
>>
>>date1="12/12/2005" and date2=21/08/2006
>>
>>Thriugh mathematics I know the difference is ;
>>
>>8 months and 10 days.
>>
>>How I can proceed with VFP to get the result?
>>
>>Chandan
>
>10 days ? sure ?
>
>
>SET DATE DMY
>date1=CAST("12/12/2005" as d)
>*
>date2=CAST("21/08/2006" as d)
>
>mdiff =((YEAR(date2)-YEAR(date1))*12+MONTH(date2)-MONTH(date1)) % 12
>dDiff = date2 - GOMONTH(date1,mdiff)
>CLEAR
>
>? mdiff,dDiff
>
PMFJI, Fabio
but I think it depends on if you just want the difference between the two days, such as your example, or if you need the number of days for that period for finanical purposes, which causes one day to be added to the difference because you have to include the begin and end days of the period. Hope this makes since.
Beth