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
1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 | |