从连接到多维数据集的 Excel 数据透视表中的日期中删除时间戳

发布于 2024-12-27 20:36:30 字数 296 浏览 2 评论 0原文

因此,我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

︶葆Ⅱㄣ 2025-01-03 20:36:30

检查属性的“格式字符串”属性...我相信“shortdate”选项就是您想要的。

在此处输入图像描述

check the "format string" property for the attribute...I believe the "shortdate" option is what you want.

enter image description here

dawn曙光 2025-01-03 20:36:30

使用下面的代码将计算列添加到时间维度

CONVERT(Varchar, [YOUR DATE COLUMN], 103) AS Date_UK

,并将“名称列”属性更改为日期时间维度属性的新计算列

Add a calculated column to your time dimension using the code below

CONVERT(Varchar, [YOUR DATE COLUMN], 103) AS Date_UK

and change the 'Name Column' attribute to your new calculated column for the datetime dimension attribute

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文