【问题标题】:Convert timestamp to date in Excel pivot table在 Excel 数据透视表中将时间戳转换为日期
【发布时间】:2017-05-10 10:23:37
【问题描述】:

我有一个数据透视表,目前看起来像这样:

                                  No of Sales  
 Team 1
     2017-03-10T07:10:20.289Z     1
     2017-03-10T07:10:22.289Z     4
     2017-03-14T07:08:20.289Z     10

 Team 2
     2017-03-11T07:14:20.289Z     11

我想按时间戳中的日期分组,只显示当天的日期和总数,所以它看起来像这样:

                                  No of Sales  
 Team 1
     2017-03-10                   5
     2017-03-14                   10

 Team 2
     2017-03-11                   11

我该怎么做?

【问题讨论】:

  • 您想使用辅助列来转换excel中的日期吗?

标签: excel date group-by pivot-table excel-2016


【解决方案1】:

你可以做剩下的代码,但重要的部分是:

strTemp= cells(row, col).value 'this contains the date 2017-03-10T07:10:20.289Z 

strDate = split(strTemp, "T")(0)

就是这样。

【讨论】:

    猜你喜欢
    • 2016-12-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-26
    • 2020-02-18
    • 1970-01-01
    • 1970-01-01
    • 2018-02-09
    相关资源
    最近更新 更多