Claudia,
You should just be able to subtract the two datetime instances and get a
TimeSpan instance. From that, you can use the Days property to find the
number of days between the two dates.
If the DateDiff has logic that the standard operations on DateTime does
not provide, then you can add a reference to Microsoft.VisualBasic.dll and
then use the DateDiff function like you would in VB.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Claudia Fong" <cd********@yahoo.co.ukwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi,
In VB we have DateDiff to calculate the days difference between 2 dates,
I was wondering if we
have something like that in C#?
I want to calculate for example the days difference betwenn 19/06/2007
and 12/06/2007.. it
should return 7
Cheers!
Claudi
*** Sent via Developersdex http://www.developersdex.com ***