Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
3 |