Cloud Software Group, Inc. EBX®
Documentation > Developer Guide > EBX® Script > API
Navigation modeDocumentation > Developer Guide > EBX® Script > API

Unit core.date

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.

function now(): date

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.

addDays

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

addMonths

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

addYears

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

days

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

fromDatetime

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

months

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

now

function now(): date

Returns current date.

Return :

the current date.

Can be used in: Script tasks, Table triggers, Function fields without search optimization

of

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

years

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

Documentation > Developer Guide > EBX® Script > API