Forum Discussion
SQL Server DQ Date data type
- Anonymous9 years ago
Hi Anonymous,
When I write T-SQL statements to get data from SQL Server, I can reproduce your issue.
In this case, you can directly change the data type of the date column in Report View, please click the Date column in the Fields panel of the following screenshot, then you can click on Modeling in the Desktop ribbon and change its type to Date.
Also you can change the date format to your desired format.
Thanks,
Lydia Zhang
Hi Anonymous,
Firstly, I am not able to reproduce your issue that date data type is represented as DateTime in Power BI when connecting SQL Server 2014 Standard edition via Direct Query option, please check the following screenshots. Power BI Desktop doesn’t change the Date data type to DateTime. Please make sure that your columns are defined as Date data type in SQL Server.
Secondly, when we use Advanced filtering to filter a Date type field in Power BI Desktop, it still shows the time portion in visual level filter, from my point of view, this behavior is by design. I have reported this issue internally and will post back once I get any updates.
Thanks,
Lydia Zhang
Anonymous It doesn't seem very intuitive to me that even when I do change the data type/format in Power BI that the output in the preview appears as 9/8/2016 but when the field appears in the visual it shows up as Thursday, September 8th, 2016... I don't ever see using that format in a visual...
The date datatype from SQL always by default is showing up as 9/8/2016 12:00:00000 (or something to that effect.