AggDatetime
The AggDatetime function sends a request to execute an aggregate warehouse function that returns a date data type. This function is the aggregate version of CallDatetime.
AggDatetime 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 AggDatetime, 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:
- function name (required) - an aggregate warehouse function to execute
- arguments (required) - one or more arguments to pass to the warehouse function
All arguments must meet the warehouse function’s input requirements. Unsupported arguments result in an invalid formula.
Example
A table contains a Date column that returns the timestamp of all order transactions for each customer. Using the AggDatetime function, you can execute Snowflake’s MAX function in a higher grouped level of the table to return the latest timestamp of a customer’s shopping history.
Returns the most recent date time value from the Date column for each customer identified in the Cust Key column.


