Forum Discussion
Power bi reading date incorrectly from msSQL table/Wrong date column
Hi Anonymous,
which application does the table belong to?
Hey mwegener,
I am using import mode to connect to msSQL tables for Manage Engine Service Desk Plus.
- mwegener6 years agoMost Valuable Professional
Hi Anonymous ,
I think the program works with a UNIX timestamp.
Look at this.
- Anonymous6 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_WorkOrderCan you please advise?
- tex6286 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