![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Knowledge Base Most common error and how to trouble shoot them off |
![]() |
|
Convert string to date
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
I tried the following: Private Sub Clean1_Click() Dim datStartDate2 As Date Dim strStartDate As String StartDate.SetFocus strStartDate = StartDate.Text datStartDate2 = CDate(strStartDate) StartDate2.SetFocus StartDate2.Text = datStartDate End Sub but keep coming up with a type mismatch error. I also tried DateValue instead of CDate but still got a type mismatch error. I've tried dim-ing datStartDate2 as Date and as Var but still get that error. Any suggestions? |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
This would save you the import. Second, the append query could be something like this: INSERT INTO tblCalendarA (StartDate, StartTime, EndTime) SELECT MID(StartDate, 2), MID(StartTime, 2), MID(EndTime, 2) FROM |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|