daft.functions.make_timestamp_ltz#
make_timestamp_ltz #
make_timestamp_ltz(year: Expression, month: Expression, day: Expression, hour: Expression, minute: Expression, second: Expression, timezone: str | None = None) -> Expression
Creates a UTC timestamp from individual date/time components.
When timezone is provided, the components are interpreted in that timezone and converted to UTC. Without a timezone the components are treated as UTC directly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year | Expression | integer expression for the year. | required |
month | Expression | integer expression for the month (1-12). | required |
day | Expression | integer expression for the day (1-31). | required |
hour | Expression | integer expression for the hour (0-23). | required |
minute | Expression | integer expression for the minute (0-59). | required |
second | Expression | numeric expression for the second (0-59, may include fractional part). | required |
timezone | str | None | optional source timezone string (e.g. | None |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Expression | a Timestamp(microseconds, UTC) expression. |
Examples:
1 2 3 4 5 | |
make_timestamp_ltz(col(y), col(m), col(d), col(h), col(mi), col(s)) Source code in daft/functions/datetime.py
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 | |