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.
CallDatetime is a passthrough function.
The functions that can be used with a passthrough function depend on your connected data platform’s native SQL functions. For example, on Snowflake connections, browse the Snowflake SQL function reference to find functions that return a value that matches the datatype of the passthrough function.
With CallDatetime, you can use a function that returns a date value.
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
Function arguments:
Notes
- When using CallDatetime, Sigma converts a date value to a timestamp with a time zone before sending it to your data platform, even when the source column doesn’t include time zone information. Depending on the warehouse function you call and how it handles time zone information, this conversion can impact the result of the passthrough 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.
- 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.


