I am reading off a CSV file with some hours, but this is a string. The "Labor" column have values such as followed:
When I do my test in SQL Developer, I can convert my string into date, and then get it to decimal. However, when I put this in my VB.net application so the user do the BulkCopy, I am getting the following error:
"Undefined function 'TO_DATE' in expression."
Here's my VB.Net code.
Dim cmd As New OleDb.OleDbCommand("SELECT [Name], [ORDER], [JOB], " _
& "ROUND((TO_DATE(LPAD(NVL([Duration], '00:00'), 5, '0'), 'HH24:MI')-TRUNC(TO_DATE(LPAD(NVL([Duration], '00:00'), 5, '0'), 'HH24:MI'), 'DD'))*24, 2) FROM [" + csvFileName + "]", excelstrCon)
Dim reader As OleDb.OleDbDataReader = cmd.ExecuteReader
Can I not use these functions? Or do I need to do SQL function instead?