March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I am trying to add dataflows to a datamart, however when loading up the data to the datamart, I am getting an error that my date column is not a valid date/time field. Please see error below.
Wrapping things up
InternalError
ErrorMessageString was not recognized as a valid DateTime.
HttpStatusCode 500
I am suspecting it is because the locale seems to be resetting itself (to United States) after you load data in the dataflow.
Could you please have a look?
thanks,
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for @Anonymous '' sharing, users who have faced with the same issue could try his workaround:
It assumes a valid table and a string column list as parameters and assumes the columns are of type text.
Feel free to use and adapt it (e.g.making it more generic for different TZs).
Function TransformSQLDTZ () :
let
Quelle = (Tab as table, cols as list) => let
Quelle1 = Table.ReplaceValue(Table.ReplaceValue(Table.ReplaceValue(Tab,"+01:00","",Replacer.ReplaceText,cols),"T"," ",Replacer.ReplaceText,cols),"+02:00","",Replacer.ReplaceText,cols)
in
Quelle1
in
Quelle
Implementation (query code snippet, copy to query code, adapt "StepBeforeDateConversion" to your previous step name) :
ChangeDatestoText = Table.TransformColumnTypes(StepBeforeDateConversion,{{"AnalyticsUpdatedDate", type text}, {"CompletedDate", type text}, {"StartedDate", type text}}),
TransformSQLDTZ = TransformSQLDTZ(ChangeDatestoText, {"AnalyticsUpdatedDate","CompletedDate", "StartedDate"}),
After those amendments you should be able to import datetimes/datetimezones successfully into datamart (as text values).
Best Regards,
Community Support Team _ Yingjie Li