rollSecond()

Adds the specified (signed) amount to the Second field, without changing larger fields.

Syntax

Calendar rollSecond(Numeric amount)
  1. amount is the signed amount to add to the Second field.

Usage

For example, to roll the current date time up by one second call:
Calendar.fromDate(Date.parseString("08/31/1999","mm/dd/yyyy")).rollSecond(1).toDate().toString("MM/dd/yyyy hh:mm:ss")
This example populates a Word Box.