polarisking
Member
I posted this a couple of days ago in the Excel area, and got a couple of Power Pivot responses. My dilemma is that I'm bringing in the EU Date with time, and it's not converting to US. In those cases where there's no time component, the conversion works just fine. Here's what I use using the value of 4 to denote DMY
Code:
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Test for EU Date Time Conversion for Chandoo.txt" _
, Destination:=Range("$A$1"))
.CommandType = 0
.Name = "Test for EU Date Time Conversion for Chandoo"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(4)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With