Order datetime

Order datetime is the date (and time) on which an order was placed.

  • First order date is the date on which the first order was placed by a customer.

  • Latest order date is the date (and time) on which the most recent order was placed by a customer.

  • Second order date is the date on which the second order was placed by a customer.

Examples

The following topics contain examples of using datetimes:

Use in segments

You can access datetime attributes directly from the Segment Editor. To add these attributes to your segments, click Add criteria, select the Transaction Attributes Extended table (for First Order Datetime, Latest Order Datetime, and Second Order Datetime) or the Unified Transactions table (for Order Datetime), apply a condition, and then specify a value.

Available conditions

The following table lists the conditions that are available to these attributes.

Note

These attributes have a Datetime data type. All Datetime data types share the same set of conditions. Recommended conditions for this attribute are identified with “  More useful” and conditions with more limited use cases are identified with “  Less useful”.

Condition

Description

is

Avoid using the is condition with these attributes unless you intend to use a specific date, such as “2022-08-22” (“yyyy-mm-dd”).

is after

  More useful

Return all dates that occur after the selected calendar date, excluding the selected calendar date.

is before

  More useful

Return all dates that occur before the selected calendar date, excluding the selected calendar date.

is between

  More useful

Returns dates that exist within a defined start and end date.

For example, all orders made during a holiday shopping window, all orders made during a calendar year, and so on. Combine these attributes and condition with channels, brands, and purchase locations to build more specific audiences.

is not between

Returns order dates that exist outside of a defined start and end date.

For example, if you choose August 10, 2022 and August 12, 2022 as your start and end dates, all orders before August 10. 2022 and all orders after August 12, 2022 will be returned.

is not NULL

Returns customer records that have a value.

is NULL

Returns customer records that do not have a value.

is on or after

Returns all dates that occur on or after the selected calendar date. Use a relative date to define a rolling window.

For example, use “today - 90 days” to return orders that have been made during the previous 90 days.

is on or before

Return all dates that occur on or before the selected calendar date. Use a relative date to define a rolling window.

For example, use “today - 1080 days” to return orders that were made 3 (or more) years ago.

About relative dates

A relative date is determined at the time a segment is run, where today is the day on which the segment is run. For example: yesterday, 30 days ago, 14 days ago, or 1 year ago. The list of relative date values includes a series of common ranges, but you may also type in a more specific range, such as 2 months ago or 5 days ago.

Relative date values

Value

Description

Tomorrow

Starts at 12:00:00 AM of the day after the current day.

For example, if the current day is “Thursday 01 / 12 / 2023” then tomorrow is “Friday 01 / 13 / 2023”.

Today

Starts at 12:00:00 AM (or at the current time) on the current day and continues for 24 hours.

For example, if the current day is “Thursday 01 / 12 / 2023” then today is “Thursday 01 / 12 / 2023”.

Yesterday

Starts at 12:00:00 AM of the day before the current day.

For example, if the current day is “Thursday 01 / 12 / 2023” then yesterday is “Wednesday 01 / 11 / 2023”.

N days ago

Starts at 12:00:00 AM of the day N days before the current day.

For example, if the current day is “Thursday 01 / 12 / 2023”, then:

  • 7 days ago is “Thursday 01 / 05 / 2023”

  • 14 days ago is “Thursday 12 / 29 / 2022”

  • 30 days ago is “Tuesday 12 / 13 / 2022”

  • 60 days ago is “Sunday 11 / 13 / 2022”

  • 90 days ago is “Friday 10 / 14 / 2022”

1 month ago

Starts at 12:00:00 AM of the same day of the month that is 1 month before the current month.

For example, if the current day is “Thursday 01 / 12 / 2023” then 1 month ago is “Monday 12 / 12 / 2022”.

1 year ago

Starts at 12:00:00 AM of same day of the year that is 1 year before the current year.

For example, if the current day is “Thursday 01 / 12 / 2023” then 1 year ago is “Wednesday 01 / 12 / 2022”.