【问题标题】:How can I extract the month information from Linux Time Stamp in VBA?如何从 VBA 中的 Linux 时间戳中提取月份信息?
【发布时间】:2014-10-14 06:17:55
【问题描述】:

在 Excel VBA 脚本中,我有一个这样的时间戳:

1402437599000

如何提取月/年信息?

【问题讨论】:

    标签: excel vba timestamp


    【解决方案1】:

    好的,是时候回答自己的问题了:

    Dim activityDate As Date
    activityDate = 1402437599000
    Debug.Print activityDate
    Debug.Print Month(activityDate)
    

    你会得到:

    12.07.2014 21:59:59 
    7 
    

    【讨论】:

    • activityDate = 1402437599000 可能会导致溢出。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-20
    • 2020-12-24
    • 1970-01-01
    • 2017-09-12
    • 1970-01-01
    • 1970-01-01
    • 2018-01-10
    相关资源
    最近更新 更多