module pixeltable.functions.timestamp
Pixeltable UDFs for TimestampType.
Usage example:
udf astimezone()
Convert the datetime to the given time zone.
Parameters:
udf day()
Between 1 and the number of days in the given month of the given year.
Equivalent to datetime.day.
udf hour()
Between 0 and 23 inclusive.
Equivalent to datetime.hour.
udf isocalendar()
Return a dictionary with three entries: 'year', 'week', and 'weekday'.
Equivalent to
datetime.isocalendar().
Return a string representing the date and time in ISO 8601 format.
Equivalent to datetime.isoformat().
Parameters:
sep (String): Separator between date and time.
timespec (String): The number of additional terms in the output. See the
datetime.isoformat()
documentation for more details.
udf isoweekday()
Return the day of the week as an integer, where Monday is 1 and Sunday is 7.
Equivalent to datetime.isoweekday().
udf make_timestamp()
Create a timestamp.
Equivalent to datetime().
udf microsecond()
Between 0 and 999999 inclusive.
Equivalent to datetime.microsecond.
udf minute()
Between 0 and 59 inclusive.
Equivalent to datetime.minute.
udf month()
Between 1 and 12 inclusive.
Equivalent to datetime.month.
udf posix_timestamp()
Return POSIX timestamp corresponding to the datetime instance.
Equivalent to datetime.timestamp().
udf replace()
Return a datetime with the same attributes, except for those attributes given new values by whichever keyword
arguments are specified.
Equivalent to datetime.replace().
udf second()
Between 0 and 59 inclusive.
Equivalent to datetime.second.
udf strftime()
Return a string representing the date and time, controlled by an explicit format string.
Equivalent to datetime.strftime().
Parameters:
udf toordinal()
Return the proleptic Gregorian ordinal of the date, where January 1 of year 1 has ordinal 1.
Equivalent to datetime.toordinal().
udf weekday()
Between 0 (Monday) and 6 (Sunday) inclusive.
Equivalent to datetime.weekday().
udf year()
Between MINYEAR and
MAXYEAR inclusive.
Equivalent to datetime.year.Last modified on January 15, 2026