time.sub

TIMEtime.subTIMEt1TIMEt2

Available in all subroutines.

Subtracts a relative time from a time.

Example

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

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.