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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top