Look up "DateTime.Subtract Method". You subtract one from another and get a
time span object:
TimeSpan ts = date1.Subtract(date2); // both are DateTime
NOTE: The suggestion of Compare() in answer to DateDiff (another answer
post) was a bit tongue in cheek. ;->
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Ben" <bl*********@yahoo.com> wrote in message
news:D0**********************************@microsof t.com...
Hi,
What is the synatx in C# for calculating date difference between 2 dates
in terms of no. of days?
Thanks,
Ben