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.
@Adjust( dateToAdjust ; years ; months ; days ; hours ; minutes ; seconds ; [DST] )
dateToAdjust
Time-date or time-date list. The time-date value you want to increment. This should be a single date, not a range.
years
Number. The number of years to increment by.
months
Number. The number of months to increment by.
days
Number. The number of days to increment by.
hours
Number. The number of hours to increment by.
minutes
Number. The number of minutes to increment by.
seconds
Number. The number of seconds to increment by.
[DST]
Keyword. Optional. Specify [INLOCALTIME] to further adjust the time for daylight-saving time if the adjustment crosses the boundary and daylight-saving time is in effect. Specify [INGMT] or omit this parameter to not further adjust the time for daylight-saving time. The adjustment is such that adding or subtracting in day increments yields the same time in the new day.
adjustedDate
Time-date. The date, incremented by the amount of time you have specified.
If the first parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
You must include all arguments except the [DST] keyword; include a zero (0) for parameters you don't want to adjust.
The arguments are applied from first to last. For instance, @Adjust([2/2/2006]; 0; 2; 28; 0; 0; 0) returns [5/2/2006], not [4/30/2006] as you might expect. This is because @Adjust first adds 28 days, making [3/2/2006], then adds two months, making [5/2/2006]. To first add two months, then add 28 days, use @Adjust twice, for instance: @Adjust(@Adjust([02/02/2006]; 0; 2; 0; 0; 0; 0); 0; 0; 28; 0; 0; 0)
(date2-date1)/86400
This code returns 4.
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.
@Adjust([06/30/95];2;2;2;0;0;0)
Notes/Domino sees 30 in the days portion of the time-date value and adjusts it by 2, which increments the month value by 1. Notes/Domino then adjusts the month value by 2, and the year value by 2.
@Adjust([03/30/96];-2;0;-10;0;0;0)
Notes/Domino returns a date that is 2 years and 10 days before the supplied date.
@Adjust([06/29/95] : [06/30/95]; 2; 2; 2; 0; 0; 0)
@Adjust(Date;0;1;0;0;0;0)
@Adjust(@Now;0;1;1;0;0;0)
@Adjust( dueDate; 0; 0; - ( @Weekday( dueDate ) - 2 ); 0; 0; 0 )
@Adjust([2/2/2006]; 0; 2; 28; 0; 0; 0)
@Adjust(@Adjust([02/02/2006]; 0; 2; 0; 0; 0; 0); 0; 0; 28; 0; 0; 0)
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