# could not convert to column Date to data type Date



## krrishkrsna (Apr 22, 2017)

hi

downloaded data EMT1386-ImportTestData-2018.txt and imported through Power Query, but when i tried to convert column Date to data type Date, getting for many values as DataFormat.Error: We couldn't parse the input provided as a Date value

(imported steps: PowerQuery > text/csv > file origin as 1252: Western European (Windows) > delimiter as Tab)

plz solve the issue


----------



## Norie (Apr 22, 2017)

How are the dates formatted in the file?


----------



## krrishkrsna (Apr 22, 2017)

after importing it is formatted in data type to Text. when i convert data type to Date, many values returns Error

used same data many time before Power Query updation, that time no issues 

currently using April 2017 PQ  and POWERBI updated version


----------



## MarcelBeug (Apr 22, 2017)

My best guess is that you should change data type using locale "en-US".

In the code of the finished file, query Text2018DataImport:

= Table.TransformColumnTypes(#"Promoted Headers",{{"TransactionID", Int64.Type}, {"Date", type date}, {"Website", type text}, {"Product", type text}, {"Quantity", Int64.Type}, {"RevenueDiscount", type number}, {"NetStandardCost", type number}, {"CountryCode", type text}}, *"en-US"*)


----------



## krrishkrsna (Apr 22, 2017)

MarcelBeug is the Man with Good Solution. thank you sir.

earlier version of PwrQry was working fine but latest version giving errors. so not sure when issue will be cleared from microsoft


----------

