PDA

Click to See Complete Forum and Search --> : Combining text boxes


hbarker
Dec 8th, 1999, 10:12 PM
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?

Aaron Young
Dec 9th, 1999, 11:28 AM
Use the CDate Function and Combine the Date and Time Textboxes together as a String, eg.

Private Sub Command1_Click()
MsgBox "Time Difference is " & DateDiff("n", CDate(txtDate1 & " " & txtTime1), CDate(txtDate2 & " " & txtTime2)) & " Minutes"
End Sub


------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net