addSeconds

Full name: taxi.stdlib.dates.addSeconds

Signature

declare function <T> addSeconds(T, Int):T

Description

Adds the specified number of seconds to a datetime or instant. Use a negative value to subtract seconds.

// Expire a token 3600 seconds (1 hour) from now
find {
   expiresAt: Instant = addSeconds(Instant, 3600)
}

Examples

Adds seconds to an instant — positive to advance, negative to go back.

Try it out

Schema
Query Plan
Play with this snippet by editing it here, or edit it on Taxi Playground
Result
Query failed
Next
Welcome to Taxi