How-To: Filtering on Multiple Timestamps

If you have multiple timestamps, for example a timestamp when an event on entry is created and another when it is modified, selection of events across both criteria can be achieved by using a case statement. For example, to filtering events when:

  • created_timestamp is in the last 7 days

  • modified_timestamp is in the last 10 days

Using a case statement allows you to filter by these two situations and still match the original events.

logscale
case {
  test(created_timestamp > now() - duration("7d"));
  test(modified_timestamp > now() - duration("10d"));
}