You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Leveraging TIMESTAMP SQL Expressions to Retrieve Relative Date Ranges

edited Oct 12, 2023 3:51PM in Eloqua

With the help of TIMESTAMP SQL expressions, analyzers can build customized reports with relative date ranges, not currently offered as a built-in feature in Insight.

TIMESTAMPADD manipulates data of the data types DATE and DATETIME based on a calendar year.

Syntax: TIMESTAMPADD(interval, expr, timestamp)

Example: TIMESTAMPADD(SQL_TSI_MONTH, -12, CURRENT_DATE)

Timestamp Interval (TSI) Options:

  • SQL_TSI_SECOND
  • SQL_TSI_MINUTE
  • SQL_TSI_HOUR
  • SQL_TSI_DAY
  • SQL_TSI_WEEK
  • SQL_TSI_MONTH
  • SQL_TSI_QUARTER
  • SQL_TSI_YEAR

Below, I will present two use cases where the TIMESTAMP function has been employed to generate reports showcasing dynamic date range outcomes.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!