BigQuery 日期从字符串到日期的转换
Bigquery date conversion from string to date
我在 BigQuery 中有一个字段字符串字段,其值类似于“2009 年 1 月 27 日 12:00AM”。
如何在 BigQuery 中将“Jan 27 2009 12:00AM”转换为“2009-01-27”?
尝试以下操作:
select
parse_timestamp("%b %e %Y %R%p", "Jan 27 2009 12:00AM" )
有关 parse_timestamp 函数的更多详细信息,请参见此处:
https://cloud.google.com/bigquery/docs/reference/standard-sql/timestamp_functions#parse_timestamp
我在 BigQuery 中有一个字段字符串字段,其值类似于“2009 年 1 月 27 日 12:00AM”。
如何在 BigQuery 中将“Jan 27 2009 12:00AM”转换为“2009-01-27”?
尝试以下操作:
select
parse_timestamp("%b %e %Y %R%p", "Jan 27 2009 12:00AM" )
有关 parse_timestamp 函数的更多详细信息,请参见此处: https://cloud.google.com/bigquery/docs/reference/standard-sql/timestamp_functions#parse_timestamp