TIBCO® Data Virtualization Google Big Query Adapter Guide
60 | Google BigQuery Adapter
CURRENT_DATETIME([timezone])
Returns the current time as a DATETIME object.
l
timezone: The timezone to use when retrieving the current datetime object.
DATETIME(timestamp [, timezone])
Constructs a DATETIME object using a TIMESTAMP object.
Note: this function is only available when using Standard SQL (UseLegacySQL=False).
l
timestamp: The timestamp from which to return the datetime.
l
timezone: The timezone to use when converting the timestamp. If not specified, the
default timezone, UTC, is used.
DATETIME_DIFF(datetime1, datetime2, date_part)
Computes the number of specified date_part differences between two date expressions.
This can be thought of as the number of date_part boundaries crossed between the two
dates. If the first date occurs before the second date, then the result is negative.
Note: this function is only available when using Standard SQL (UseLegacySQL=False).
l
datetime1: The first datetime.
l
datetime2: The second datetime.
l
date_part: The date part. Possible values include: MICROSECOND, MILLISECOND,
SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, and YEAR.
DATETIME_TRUNC(datetime, part)
Truncates the datetime to the specified granularity.
Note: this function is only available when using Standard SQL (UseLegacySQL=False).
l
date: The datetime to truncate.
l
part: The date part. Possible values include: MICROSECOND, MILLISECOND, SECOND,
MINUTE, HOUR, DAY, WEEK, ISOWEEK, MONTH, QUARTER, YEAR, and ISOYEAR.