rollHourOfDay()
Adds the specified (signed) amount to the Hour of
Day
field, without changing larger fields.
Syntax
Calendar rollHourOfDay(Numeric amount)
- amount is the signed amount to add to the
Hour of Day
field.
Usage
When rolling on the Hour of Day
field, it will roll the hour value in the range
between 0 and 23, which is zero-based.
For example, to roll the current date time up by one hour
call:
Calendar.fromDate(Date.parseString("08/31/1999","mm/dd/yyyy")).rollHourOfDay(1).toDate().toString("MM/dd/yyyy hh:mm:ss")
This
example populates a Word Box.