TimestampType.
Usage example:
UDFs
astimezone() udf
Convert the datetime to the given time zone.
Signature:
tz(String): The time zone to convert to. Must be a valid time zone name from the IANA Time Zone Database.
day() udf
Between 1 and the number of days in the given month of the given year.
Equivalent to datetime.day.
Signature:
hour() udf
Between 0 and 23 inclusive.
Equivalent to datetime.hour.
Signature:
isocalendar() udf
Return a dictionary with three entries: 'year', 'week', and 'weekday'.
Equivalent to datetime.isocalendar().
Signature:
isoformat() udf
Return a string representing the date and time in ISO 8601 format.
Equivalent to datetime.isoformat().
Signature:
sep(String): Separator between date and time.timespec(String): The number of additional terms in the output. See thedatetime.isoformat()documentation for more details.
isoweekday() udf
Return the day of the week as an integer, where Monday is 1 and Sunday is 7.
Equivalent to datetime.isoweekday().
Signature:
make_timestamp() udf
Create a timestamp.
Equivalent to datetime().
Signature:
microsecond() udf
Between 0 and 999999 inclusive.
Equivalent to datetime.microsecond.
Signature:
minute() udf
Between 0 and 59 inclusive.
Equivalent to datetime.minute.
Signature:
month() udf
Between 1 and 12 inclusive.
Equivalent to datetime.month.
Signature:
posix_timestamp() udf
Return POSIX timestamp corresponding to the datetime instance.
Equivalent to datetime.timestamp().
Signature:
replace() udf
Return a datetime with the same attributes, except for those attributes given new values by whichever keyword
arguments are specified.
Equivalent to datetime.replace().
Signature:
second() udf
Between 0 and 59 inclusive.
Equivalent to datetime.second.
Signature:
strftime() udf
Return a string representing the date and time, controlled by an explicit format string.
Equivalent to datetime.strftime().
Signature:
format(String): The format string to control the output. For a complete list of formatting directives, seestrftime()andstrptime()Behavior.
toordinal() udf
Return the proleptic Gregorian ordinal of the date, where January 1 of year 1 has ordinal 1.
Equivalent to datetime.toordinal().
Signature:
weekday() udf
Between 0 (Monday) and 6 (Sunday) inclusive.
Equivalent to datetime.weekday().
Signature:
year() udf
Between MINYEAR and
MAXYEAR inclusive.
Equivalent to datetime.year.
Signature: