Date Attribute
The date attribute stores the timestamp of an event.
How it works
Use the date attribute to store important timestamps such as First Purchase Date, Last Checkout Date, or Last Visit date.
The date attribute is available for the following scopes: Event, Visit and Visitor.
Date formatter
To convert a string attribute to a date, use the date formatter. Select the timestamp components from the date format panel that match the string values. For example, a string value such as “01/31/2020” can be converted to a date using a format of “MM/dd/yyyy”.
Date and time string patterns:
G Era designator (before christ, after christ)
y Year (e.g. 12 or 2012). Use either yy or yyyy.
M Month in year. Number of M's determine length of format (e.g. MM, MMM or MMMMM)
d Day in month. Number of d's determine length of format (e.g. d or dd)
h Hour of day, 1-12 (AM / PM) (normally hh)
H Hour of day, 0-23 (normally HH)
m Minute in hour, 0-59 (normally mm)
s Second in minute, 0-59 (normally ss)
S Millisecond in second, 0-999 (normally SSS)
a AM / PM marker
z Time Zone
Z RFC 822 Time Zone
' Escape for text delimiter
' Single quote
Reference (with examples): SimpleDateFormat Java Class
Size Limits
The size of a each date attribute is limited to the following range:
- Minimum: “-292275055-05-16T16:47:04.192Z”
- Maximum: “+292278994-08-17T07:12:55.807Z”
These attributes are also limited by the maximum size of the profile after encryption and compression (400 KB).
Date enrichments
Capture date
The Capture Date enrichment sets the attribute to the current timestamp at the time of an event condition. This enrichment is available for scopes: event, visit and visitor.
For example, to capture the Last Purchase Date, use this enrichment with a rule that identifies a purchase event.
Attribute Name: Last Purchase Date
- Starting Value:
""
- Enriched With:
- Resulting Value:
1491233145706
Set date
The Set Date enrichment sets the attribute to the value of another attribute. If the other attribute is a string, use the Date Formatter to convert it to a date. This enrichment is available for attributes: event, visit and visitor.
Attribute Name: Last Purchase Date
- Starting Value:
""
- Enriched With:|
1491233145706
- Resulting Value:
1491233145706
Remove date
The Remove Date enrichment erases the value of a date attribute. This enrichment is available for attributes: event, visit and visitor.
Attribute Name: Last Visit Date
- Starting Value:
1491233145706
- Resulting Value:
""
Format date
The Format Date enrichment sets the value based on an expected date format of incoming values. It is used when neither a “TiQ Variable” nor native attribute type exists.
This enrichment is only available for event attributes.
This page was last updated: March 6, 2024