Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a new project that is pulling in data from a proprietary SQL database. I am using a query to get the data and it comes through fine, however the date data is showing up as long integers like 1412956095860. I tried to use the DATE() or DATEVALUE() to convert it to mm/dd/yyyy hh:ss, but it is not working. When I save the results as a csv and then open in Excel, it seems to convert automatically. What should I do to solve this? Or should I just have a SQL script that produces a csv and then read the data from there into Power BI?
Thanks,
Brad
Solved! Go to Solution.
I think I found the issue: http://lawthirtysix.com/reporting-choices-and-date-handling-in-servicedesk-plus/
And if anyone else in the future is looking for a possible answer to this, in my SQL query for a date or time column, I used this: dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + ("RESPONDEDTIME"/1000),'01-01-1970 00:00:00') AS "Responded Date"
When you say proprietary SQL database do you mean not Microsoft or Oracle or IBM but something you wrote or some other vendor?
I think I found the issue: http://lawthirtysix.com/reporting-choices-and-date-handling-in-servicedesk-plus/
And if anyone else in the future is looking for a possible answer to this, in my SQL query for a date or time column, I used this: dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + ("RESPONDEDTIME"/1000),'01-01-1970 00:00:00') AS "Responded Date"
Something written from a vendor; proprietary might not be the correct wording, but it is a database I am not going to change. It is a local instance, but is intertwined with SaaS we use. And I am thinking that all this number is is probably the number of seconds from 1-1-1900 (or whatever it is) so I need to divide that number by 86400 and format on that result? These numbers I think are like the Excel Date serial numbers and might be an easy way for the program to do Date Differences quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
2 | |
1 | |
1 | |
1 |