daft.functions.from_unixtime#
from_unixtime #
from_unixtime(expr: Expression, format: str | None = None) -> Expression
Converts a Unix timestamp (seconds) to a formatted string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expr | Expression | A numeric expression representing seconds since epoch. | required |
format | str | None | Optional strftime format string. Defaults to '%Y-%m-%d %H:%M:%S'. | None |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Expression | a Utf8 expression with the formatted timestamp. |
Examples:
1 2 3 4 5 | |
True Source code in daft/functions/datetime.py
1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 | |