DAYSTO
Returns the number of whole days between two given dates. If the dates used by the function include time portions then these will be used in the calculation. The difference must at least 24 Hours in order for a 1 day difference to be calculated.
DAYSTO ( <date_field> , <date_field or date> )
-
date_field: The first date field to use in the calculation.
-
date_field or date: A second date to use in the calculation.
Note: dates in Audiences need to be formatted as either YYYY-MM-DD or MM/DD/YYYY. Entering a date as 01-02-2023 would be read as Jan-2 not 1-Feb.
Example: create a field on the CUSTOMER table that returns the number of days since a customer has made a purchase.
DAYSTO(CUSTOMER.LASTEST_PURCHASE_DATE,_TODAY)