VB.NET:
Public Sub calculateDays()
' Calendar Days
Dim dtpDateCarSent As New DateTime
Dim dtpDateClosed As New DateTime
Dim dys As Integer = dtpDateClosed.Date.Subtract(dtpDateCarSent.Date).Days
End Sub
Hi, im trying to use the above code but it isnt working... I am trying to calculate the no of days between two dates that i choose on my form using a dateTimepicker control. So for example if dateCarSent is 01/01/2006 and dateCarClosed is 05/01/2006, the answer would be 4 days.
Any help much apreciated,
Al