> Dim ts As TimeSpan = crun.Subtract(lrun)
>
> I am using this to find the elapsed time, is there any way I can do this
> comparison without time part, such as if lrun=07/16/2006 and crun=07/17/2006
> I need to return 1 since there has been 1 day passed.
You can use the DateTime.Date property to return the original DateTime
but with the time portion set to midnight.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
JIM.H. - 17 Jul 2006 22:11 GMT
if I have lrun.Date and crun.Date, how should I compare what is the
difference between these dates in terms of days? Can you give me example?
> > Dim ts As TimeSpan = crun.Subtract(lrun)
> >
[quoted text clipped - 4 lines]
> You can use the DateTime.Date property to return the original DateTime
> but with the time portion set to midnight.
Jon Skeet [C# MVP] - 17 Jul 2006 22:41 GMT
> if I have lrun.Date and crun.Date, how should I compare what is the
> difference between these dates in terms of days? Can you give me example?
Subtract one from the other as you're doing now, then use the Days
property of the resulting TimeSpan.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too