CallDatetime
The CallDatetime function calls a warehouse function that returns a datetime data value. This function is often applied to display a time column or value in different formats that require conversion.
This function isn't compatible with all data platform connections. To check if your connection supports it, see Supported data platforms and feature compatibility.
Syntax
CallDatetime(function_name, argument)
Function arguments:
| function_name | The warehouse function to call. |
| argument | One or more arguments to pass to the warehouse function. |
Example
A table contains a Daily Total Seconds column that returns the session time (in seconds) for each customer as a Number type. You can pass Snowflake's TO_TIME function to the CallDatetime function to represent the number of seconds as hours, minutes, and seconds.
CallDatetime("TO_TIME", Text([Daily Total Seconds]))
- Converts the Daily Total Seconds column into hours, minutes, and seconds.
Apply custom formatting to the CallDatetime column using %H:%M:%S as the format string to only display the time portion of the timestamp returned by the TO_TIME function.

Updated 12 days ago
Related resources
