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
Anonymous Add an additional column in the dataset that returns the date in text format.
Anonymous I've tried that and it works fine as a column but the issue is when you want to use that column a filter. Since it's text you can't perform any of the date filering. Workaround is to have one column for display (text) and another for filtering but this is a very dirty hack to accomplish a basic function and you still have the time portion that's always zero'd out in the filtering.
I've actually joined my entire Date dimension hoping to get around some of this stuff but I've not been successfull.
Just wondring if this is a known limitation.
- Anonymous9 years agoNot applicable
Anonymous Must be. I've found that you can change the data type on the direct query by clicking "Edit Queries" -> "Edit Queries" -> Highlight the column and change the data type, but even when selecting "Date" it looks right in the preview table pane, but when you go back to the visuals it shows up as (example: Sunday, January 1, 2012).
I was messing around with trying to force format in M, but it looks like this is a visual rendering issue with adjusting the format...
You could explore it further to see if I'm missing something in this section, but you do have access to modify the format in Direct Query using Edit Queries. And by opening "Advanced Editor" - you can modify the "M" code.