>
>comm_date=31/03/2011
>Cur_date=31/03/2013
>
>In this case year i.e Y should come as 2 and Days D as 1 i.e Y=2 and D=1 but D is comming as 2.
>
>In some cases it is working correct while in some cases it is wrong
>
wait a minute!
Please specify what you consider BETWEEN
to me between 31/03/2011 and 31/03/2013 are exactly 2 years and NO days (not 1 day as you say), otherwise between today and today would be one day :-)
Peter
Peter Cortiel