skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Add seconds
 

Try Corticon Now

Add seconds

SYNTAX

<DateTime>.addSeconds(<Integer>)
<Time>.addSeconds(<Integer>)

DESCRIPTION

Adds the number of seconds in <Integer> to the number of seconds in the Time portion of <DateTime> or <Time>.

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

RULESHEET EXAMPLE

This sample Rulesheet uses .addSeconds in a Nonconditional rule to add 90 seconds to the value of timeOnly2 and assign the result to timeOnly1.

SAMPLE RULETEST

A sample Ruletest provides values of timeOnly2 for three instances of Entity1. Input and Output panels are shown below. Notice how the time wraps around to the beginning of the day, even though Time data type does not include date information.