This question already has answers here:
Closed 5 years ago.
In VB
there is a function called DateDiff()
. But in C# it is not available. I want a function or any code in C# that can perform the same DateDiff function as in VB..
Dim datTim1 As Date = #1/4/2001#
Dim datTim2 As Date = #1/9/2001#
Dim wD As Long = DateDiff(DateInterval.Weekday, datTim1, datTim2)
Dim wY As Long = DateDiff(DateInterval.WeekOfYear, datTim1, datTim2)
I want to do this in C#...