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
1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 | |