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

Unit core.time

Script unit that provides time functions.

Methods

function addHours(value: time, hours: decimal): time

Adds hours to a time.

function addMinutes(value: time, minutes: decimal): time

Adds minutes to a time.

function addSeconds(value: time, seconds: decimal): time

Adds seconds to a time.

function fromDatetime(value: datetime): datetime

Converts a date and time to a time.

function now(): time

Returns current time.

function of(hours: decimal, minutes: decimal, day: decimal): time

Creates a time given hours, minutes and seconds.

function seconds(startValue: time, endValue: time): decimal

Returns the number of seconds between two times.

addHours

function addHours(value: time, hours: decimal): time

Adds hours to a time. The calculation wraps around midnight.

Parameters :

value: the input time

hours: the number of hours to be added. Must be an integer.

Return :

the new time or null if any parameter is null.

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

addMinutes

function addMinutes(value: time, minutes: decimal): time

Adds minutes to a time. The calculation wraps around midnight.

Parameters :

value: the input time

minutes: the number of minutes to be added. Must be an integer.

Return :

the new time or null if any parameter is null.

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

addSeconds

function addSeconds(value: time, seconds: decimal): time

Adds seconds to a time. Fractions of seconds are supported with millisecond precision. The calculation wraps around midnight.

Parameters :

value: the input time

seconds: the number of seconds to be added. Fractions are rounded to three decimal digits.

Return :

the new time or null if any parameter is null.

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

fromDatetime

function fromDatetime(value: datetime): datetime

Converts a date and time to a time. The date part is ignored.

Parameters :

value: the input date and time

Return :

the new time or null if parameter is null.

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

now

function now(): time

Returns current time.

Return :

the current time.

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

of

function of(hours: decimal, minutes: decimal, day: decimal): time

Creates a time given hours, minutes and seconds. Fractions of seconds are supported with millisecond precision.

Parameters :

hour: the input hour

minute: the input minute

second: the input second. Fractions are rounded to three decimal digits.

Return :

the new time or null if any parameter is null.

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

seconds

function seconds(startValue: time, endValue: time): decimal

Returns the number of seconds between two times.

Parameters :

startValue: the input start date and time inclusive

endValue: the input end date and time exclusive

Return :

the number of seconds or null if any parameter is null. Return value may have a fractional part.

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

Documentation > Developer Guide > EBX® Script > API