Skip to main content

Overview

The sub-to-date transformation subtracts a specified amount of time from a date.

Syntax

sub-to-date(<date-variable>, <amount-variable>, unit="days")

Parameters

ParameterTypeRequiredDescription
date-variabledateYesThe date to subtract time from
amount-variablenumberYesThe amount of time to subtract
unitstringNoUnit of time: "milliseconds", "seconds", "minutes", "hours", "days", "months", or "years"
inputLocalestringNoLocale used to parse the input date: "pt", "nl", "en", "de", "ja", "zh", or "fr"

Examples

sub-to-date(<date-variable>, <amount-variable>, unit="days")
sub-to-date(<date-variable>, <amount-variable>, unit="hours", inputLocale="fr")