【问题标题】:How to convert timestamp to seconds in BigQuery Standard SQL如何在 BigQuery 标准 SQL 中将时间戳转换为秒
【发布时间】:2016-08-14 20:10:35
【问题描述】:

在 BigQuery Legacy Sql 中,我们使用 timestamp_to_sec() 函数将时间戳转换为秒。 BigQuery 标准 SQL 中的等价物是什么?

【问题讨论】:

    标签: google-bigquery


    【解决方案1】:

    BigQuery 旧版 SQL

    SELECT TIMESTAMP_TO_SEC(CURRENT_TIMESTAMP()) 
    

    BigQuery 标准 SQL

    SELECT UNIX_SECONDS(CURRENT_TIMESTAMP())
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多