Forum Discussion
Anonymous
6 years agoNot applicable
Power bi reading date incorrectly from msSQL table/Wrong date column
Hi all, I have been trying to import data directly from MSSQL to the query editor, however, the date/time columns are showing strange numbers (i.e. 1.45985E+12) and when I try to change the data ...
Anonymous
6 years agoNot applicable
Hi mwegener,
Please excuse my limited knowledge in SQL - I checked from the sql server and the data type is bigint however I have been trying since yesterday to add the below code in my advanced editor in the query editor but I keep getting errors.
This is the code to add:
Select dateadd(S, [unixtime], '1970-01-01') From [Table]
And this is my original code from the server:
let
Source = Sql.Database("XXXXXX\MANAGEENGINE", "servicedesk"),
dbo_WorkOrder = Source{[Schema="dbo",Item="WorkOrder"]}[Data]
in
dbo_WorkOrder
Can you please advise?
tex628
6 years agoCommunity Champion
Try adding a custom column with something like this;
Date.AddDays(#date(1970, 1, 1), [unixtime]/60/60/24)
To my knowledge there is no dateadd which allows you to add seconds in powerquery... 😞
Br,
J