FORMULA LANGUAGE


@Adjust
Example

Adjusts the specified time­date value by the number of years, months, days, hours, minutes, and/or seconds you specify. The amount of adjustment may be positive or negative.

Syntax

@Adjust( dateToAdjust ; years ; months ; days ; hours ; minutes ; seconds ; [DST] )

Parameters

dateToAdjust


years
months
days
hours
minutes
seconds
[DST]
Return value

adjustedDate


Usage

You must include all arguments except the [DST] keyword; include a zero (0) for parameters you don't want to adjust.

Tip To find the difference between two dates, subtract them. The result is returned in seconds. To adjust the result to days, divide the result by 86,400 - which is the number of seconds in a day. For example, if you have two date fields, date1, which contains [07/01/01] and date2, which contains [07/05/01], use the following formula to return the number of days between the two dates:


Calculating due dates

A typical use for @Adjust is calculating a due date from an entry date, by adjusting only one component of the time­date value, for example, the month component.

Language cross-reference

AdjustYear method in LotusScript NotesDateTime class

adjustYear method in Java DateTime class

AdjustMonth method in LotusScript NotesDateTime class

adjustMonth method in Java DateTime class

AdjustDay method in LotusScript NotesDateTime class

adjustDay method in Java DateTime class

AdjustHour method in LotusScript NotesDateTime class

adjustHour method in Java DateTime class

AdjustMinute method in LotusScript NotesDateTime class

adjustMinute method in Java DateTime class

AdjustSecond method in LotusScript NotesDateTime class

adjustSecond method in Java DateTime class

Example
See Also