We've been making changes to how we organize and display our docs. Our work isn't done but we'd love your feedback.

time.sub()

Subtracts a relative time from a time.

Format

TIME
time.sub(TIME t1, TIME t2)

Examples

1
2
3
declare local var.one_day_earlier TIME;
set var.one_day_earlier = time.sub(now, 1d);
# var.one_day_earlier is now the same time yesterday