BigQuery - 日期时间与时间戳

BigQuery - Datetime vs Timestamp

我查看了 google 大查询数据类型的文档,检查了 TimeStamp 与 Datetime 数据类型之间的差异。

据我了解,主要区别是:

Unlike Timestamps, a DATETIME object does not refer to an absolute instance in time. Instead, it is the civil time, or the time that a user would see on a watch or calendar.

那么什么时候应该使用Timestamp/Datetime?

谢谢

在大多数情况下,您会希望使用 timestamp data type. It refers to an absolute point in time. BigQuery interprets any timezone information and represents the time internally as a UTC timestamp

您很少会使用 datetime data type,它是日期和时间但没有时区。我想举的例子是,您将使用日期时间来表示 2017 年圆周率日,因为它分别出现在每个时区的 2017-03-14 15:09:26.535898