Good Afternoon,
I am making a connection to various CSV files:
Function getScriptForgeDictionary() As Variant
if not GlobalScope.BasicLibraries.isLibraryLoaded("ScriptForge") Then
GlobalScope.BasicLibraries.loadLibrary("ScriptForge")
End If
getScriptForgeDictionary= CreateScriptService("Dictionary")
End Function
Sub getSdbcFlatFileConnection(fileLoc As String)
Dim sURL$
Dim myDict As Variant
myDict= getScriptForgeDictionary()
With myDict
.Add("Extension", "csv")
.Add("HeaderLine", True)
.Add("FieldDelimiter", " ")
.Add("StringDelimiter", """")
.Add("DecimalDelimiter",".")
oParms = .ConvertToPropertyValues()
.Dispose()
End With
sURL="sdbc:flat:" & fileLoc
csvCon= getConnectionWithUserInfo(sURL, oParms)
End sub
The CSV files have date that follow MM/DD/YYYY format as well M/D/YYYY format. The SQL I am using looks something like this:
SELECT concat(year(""Date""),'-',month(""Date""),'-',dayofmonth(""Date""), ' ', ""Time"") as W_HYD_WLVL_DT.... FROM SAMPLE_TABLE_NAME
The end result is that I get date result like this:
21-0-0
Is there some kind of parameter I can use during connection that can accept the MM/DD/YYYY or M/D/YYYY format?