从连接到多维数据集的 Excel 数据透视表中的日期中删除时间戳
因此,我在 Analysis Services 2008 R2 中创建了一个多维数据集。该立方体在非时间维度之一上有一些日期。当我将日期放在 Excel 数据透视表中的筛选器上时,它总是将日期设置为,例如 01/18/2012 00:00:00.000。是否可以从中排除时间戳?我尝试在Excel中使用格式单元格,但它没有任何作用。我还尝试使用 Convert(date,fieldWithDateInfo) 从源(源是 SQL Server 数据库的视图)从日期时间转换为日期,这会删除时间戳,但随后 Excel 将该字段视为字符串,然后过滤器开始表现得很时髦。有什么建议吗?
So I have a cube created in Analysis Services 2008 R2. The cube has some dates on one of the non time dimensions. When I put the date on the filters in the excel pivot table, it always puts the date as, for example, 01/18/2012 00:00:00.000. Is it possible to exclude the timestamp from it? I tried using the format cell in excel, but it does nothing to it. I also tried converting from the source (The source is a view from a SQL Server database) from datetime to date using Convert(date,fieldWithDateInfo), and that drops the timestamp, but then Excel treats the field as string, and then the filters start acting really funky. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查属性的“格式字符串”属性...我相信“shortdate”选项就是您想要的。
check the "format string" property for the attribute...I believe the "shortdate" option is what you want.
使用下面的代码将计算列添加到时间维度
,并将“名称列”属性更改为日期时间维度属性的新计算列
Add a calculated column to your time dimension using the code below
and change the 'Name Column' attribute to your new calculated column for the datetime dimension attribute