Script unit that provides date functions.
Methods |
---|
function addDays(value: date, days: decimal): date Adds days to a date. |
function addMonths(value: date, months: decimal): datetime Adds months to a date. |
function addYears(value: date, years: decimal): date Adds years to a date. |
function days(startValue: date, endValue: date): decimal Returns the number of days between two dates. |
function fromDatetime(value: datetime): date Converts a date and time to a date. |
function months(startValue: date, endValue: date): decimal Returns the number of months between two dates. |
Returns current date. |
function dateOf(year: decimal, month: decimal, day: decimal): date Creates a date given year, month and day. |
function years(startValue: date, endValue: date): decimal Returns the number of full years between two dates. |
function addDays(value: date, days: decimal): date
Adds days to a date.
Parameters :
value: the input date
months: the number of days to be added. Must be an integer.
Return :
the new date or null if any parameter is null.
Can be used in: Script tasks, Table triggers, Function fields
function addMonths(value: date, months: decimal): datetime
Adds months to a date.
Parameters :
value: the input date
months: the number of months to be added. Must be an integer.
Return :
the new date or null if any parameter is null.
Can be used in: Script tasks, Table triggers, Function fields
function addYears(value: date, years: decimal): date
Adds years to a date.
Parameters :
value: the input date
years: the number of years to be added. Must be an integer.
Return :
the new date or null if any parameter is null.
Can be used in: Script tasks, Table triggers, Function fields
function days(startValue: date, endValue: date): decimal
Returns the number of days between two dates.
Parameters :
startValue: the input start date
endValue: the input end date
Return :
the number of days or null if any parameter is null.
Can be used in: Script tasks, Table triggers, Function fields
function fromDatetime(value: datetime): date
Converts a date and time to a date. The input time part is ignored.
Parameters :
value: the input date and time
Return :
the new date or null if parameter is null.
Can be used in: Script tasks, Table triggers, Function fields
function months(startValue: date, endValue: date): decimal
Returns the number of months between two dates.
Parameters :
startValue: the input start date
endValue: the input end date
Return :
the number of months or null if any parameter is null.
Can be used in: Script tasks, Table triggers, Function fields
function now(): date
Returns current date.
Return :
the current date.
Can be used in: Script tasks, Table triggers, Function fields without search optimization
function dateOf(year: decimal, month: decimal, day: decimal): date
Creates a date given year, month and day.
Parameters :
year: the input year
month: the input month
day: the input day
Return :
the new date or null if any parameter is null.
Can be used in: Script tasks, Table triggers, Function fields
function years(startValue: date, endValue: date): decimal
Returns the number of full years between two dates.
Parameters :
startValue: the input start date
endValue: the input end date
Return :
the number of years or null if any parameter is null.
Can be used in: Script tasks, Table triggers, Function fields