Thursday 10 March 2011

@adjust in LotusScript

Here is the code

Function AdjustDate ( pYear As Long, pMonth As Long, pDay As Long, pDate As Variant ) As Variant Dim temp As String temp = |@Adjust([| & Cstr(pdate) & |];| & Cstr(pYear) & |;| & Cstr(pMonth) & |;| & Cstr(pDay) &|;0;0;0)| AdjustDate = Evalute ( temp ) End Function

1 comment:

  1. Does the field using the @adjust formula need to be computed text to have the @adjust work properly? I tried the following formula in a field titled Follow up Date: @Adjust(DueDate;1;0;0;0;0;0). I expected the follow up date to be one year from the date shown in the due date field but it shows 02/20/2015. Maybe the problem is that there is nothing in the due date field until the user enters a date? When I enter a date in the due date field, the follow up date field does not adjust to one year from the date I just entered into the due date field. What am I doing wrong?

    ReplyDelete