Class SqlTimestampAddFunction


public class SqlTimestampAddFunction extends SqlFunction
The TIMESTAMPADD function, which adds an interval to a datetime (TIMESTAMP, TIME or DATE).

The SQL syntax is

TIMESTAMPADD(timestamp interval, quantity, datetime)

The interval time unit can one of the following literals:

  • NANOSECOND (and synonym SQL_TSI_FRAC_SECOND)
  • MICROSECOND (and synonyms SQL_TSI_MICROSECOND, FRAC_SECOND)
  • SECOND (and synonym SQL_TSI_SECOND)
  • MINUTE (and synonym SQL_TSI_MINUTE)
  • HOUR (and synonym SQL_TSI_HOUR)
  • DAY (and synonym SQL_TSI_DAY)
  • WEEK (and synonym SQL_TSI_WEEK)
  • MONTH (and synonym SQL_TSI_MONTH)
  • QUARTER (and synonym SQL_TSI_QUARTER)
  • YEAR (and synonym SQL_TSI_YEAR)

Returns modified datetime.