I have two date text boxes and two time text boxes (Start and stop date and time). I need to combine the text of start date and start time to compare with stop date and stop time.
Any Suggestions on how to combine the two text boxes?
Printable View
I have two date text boxes and two time text boxes (Start and stop date and time). I need to combine the text of start date and start time to compare with stop date and stop time.
Any Suggestions on how to combine the two text boxes?
Use the CDate Function and Combine the Date and Time Textboxes together as a String, eg.
------------------Code:Private Sub Command1_Click()
MsgBox "Time Difference is " & DateDiff("n", CDate(txtDate1 & " " & txtTime1), CDate(txtDate2 & " " & txtTime2)) & " Minutes"
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]