Date diff help please,in c#

  • Thread starter Thread starter Raghu Raman
  • Start date Start date
R

Raghu Raman

Hi

I want to find the difference between 2 dates in terms of year.It is
confusng in msdn.could u help me on that.

for ex,
int year=datediff("y",date1,date2)//of course it is in VB.
 
HI,Lucas,

Thx for that.I ll try that.But i hope it ll give the diff between two
date's year.i am expecting the diff between two dates which should
consider day,month,year into account and will have to produce the diff
in terms of years.


could u pls tell me that.


With Regards
Raghu.
 
Check out the DateTime.Subtract() method.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Back
Top