Google BigQuery Date Data Type?

我是研究僧i 提交于 2020-01-24 04:51:42

问题


Is there a date or datetime data type in Google BigQuery? I looked at the online documentation, but the data types mentioned didn't include any date types


回答1:


2013 update:

BigQuery now has a Timestamp type.

Look at: BigQuery datatypes

2018: TIMESTAMP, TIME, DATE, DATETIME




回答2:


2016 update:

BigQuery now also has real DATE type (in addition to TIMESTAMP type) in standard SQL:

https://cloud.google.com/bigquery/sql-reference/data-types#date-type https://cloud.google.com/bigquery/sql-reference/functions-and-operators#date




回答3:


Edited to add: There is a date time type, see Fh's answer for more information.

No date data type is available, although if you use ISO-formatted date-times (YYYY-MM-DD HH:MM:SS[.uuuuuu]) or timestamps (convertable to microseconds since 1970) there are a number of date functions that you can use. See this page for more information.



来源:https://stackoverflow.com/questions/12219885/google-bigquery-date-data-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!