> how can you convert a string, which is stored in a vector, into an
Consider searching the archives on the web as a first resort before posting a question. This question has already been answered numerous times. It'll save you a lot of time and will be a step forward in making you an independent/better programmer.
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...