Initially i wanted to subtract dates from texboxes. i got the solution. The code is below but with textboxes in place of datepickers. now i want to use date pickers. how can the code be modified or how can i achieve that?
If i try to use this
Private Sub Command3_Click()
Dim DateA As Date, DateB As Date
DateA = CDate(DTPicker1 & " " & DTPicker3)
DateB = CDate(DTPicker2 & " " & DTPicker4)
mins = DateDiff("n", DateA, DateB)
MsgBox "mins = " & mins
i get a type mismatch
where DTPicker 1 and 2 contain dates
and 3 and 4 contain time. What can i do ?