Date Difference Custom Value
Date Difference Custom Value (also known as the DATEDIFF() in SQL) allows you to calculate the difference between two date fields and express the difference into a specific time unit of your choice.
This can be a calculation between either:
- Two existing date fields from a Selected Data Extension
- A timestamp and an existing date field from a Selected Data Extension (and vice versa)
To learn how to add a new field to your Target Data Extension that calculates the number of days between an Order Date and the current date, see 24. Calculate Date Difference.
Video overview
Create a Date Difference Custom Value
- Under Custom Values, click the Add new value button.
- Provide a name for the Custom Value, select Apply formula to a field as Type, and click Next.
- Select Date Difference as Type of Formula and click Next.
- Select either the date fields or the timestamp that you want to calculate and the time unit you want to express the difference in.
5. Click Save and move the new Custom Value to the Target Data Extension fields.