我正在努力尝试使用 Google BigQuery 来做到这一点:
我有一列包含以下 STRING 格式的日期:
6/9/2017 (M/D/YYYY)
我想知道如何处理这个问题,尝试使用DATE
子句以获得以下格式:YYYY-MM-DD。
很简单,使用标准 SQL:
#standardSQL
SELECT PARSE_DATE('%m/%d/%Y', '6/22/2017')
2017-06-22
https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#supported-format-elements-for-date https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#supported-format-elements-for-date
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)