Date.op_Subtraction : Date « System « VB.Net by API






Date.op_Subtraction

  

public class Test

   public Shared Sub Main
        Dim date1 As Date = #7/20/2004#
        Dim date2 As Date = #8/7/2004#
        Dim elapsed_time As TimeSpan
        elapsed_time = Date.op_Subtraction(date2, date1)
        Console.WriteLine(elapsed_time.Days.ToString)
   End Sub

End class

   
    
  








Related examples in the same category

1.New Date(Int year, Int month, Int day)
2.New Date(Int year, Int month, Int day, Int hour, Int minute)
3.Date.AddDays
4.Date.AddMilliseconds
5.Date.AddMonths
6.Date.AddYears
7.Date.DayOfYear
8.Date.Millisecond
9.Date.Parse
10.Date.ToLongDateString
11.Date.ToLongTimeString
12.Date.ToOADate
13.Date.ToShortDateString
14.Date.ToShortTimeString
15.Date.ToString
16.Date.ToUniversalTime