【问题标题】:How do I get date time into this format in R: 1563921031?如何在 R: 1563921031 中将日期时间转换为这种格式?
【发布时间】:2020-06-05 18:43:46
【问题描述】:

我必须在 R 中查询带有日期时间戳的 API,但我不知道如何输入我的日期时间并将其更改为正确的格式。一个有效的日期时间戳示例是 1563921031,我认为它是自原始时间以来的秒数。

请帮忙!

【问题讨论】:

    标签: r date time formatting


    【解决方案1】:

    我们可以用as.numeric转换成数字

    as.numeric(datetime)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-22
      • 2016-02-26
      • 2022-01-19
      • 2017-10-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-09
      相关资源
      最近更新 更多