The main thing is to be clear in your own mind about what you are doing. You are not "converting a decimal number". What you want to do is display a number in octal. This is done by formatting the number. The big hammer is built-in function format which uses a format specification mini-language, but you can also get the job done using simple string formatting
Note that the documentation says that the more powerful formatting technique I first mentioned is to be preferred "for new code".
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 ...