Built-in Functions → addMinutes

addMinutes() is a scalar date function that returns a modified date after the specified minutes have been added. The number of minutes can be positive or negative.

Signature

addMinutes(date exp, long minutes)

The following table illustrates the addMinutes() parameters:

ParameterDescription
date expan expression evaluating to timestamp
long minutesthe number of minutes to add as a long

Returns

timestamp

Example

Add 10 minutes to the date December 24, 2001 11:55:12 pm.

addMinutes(timestamp("2001-12-24 23:55:12.000"), 10)

This example returns December 25, 2001 00:05:12 pm.