month, but for 4.x, they now can to this. How?
Create a layout and add the TIME field in it and call it StartDate. Ensure the
field is editable! Stick the formula in the field's programmers pane and save.
Click on Design/ Test Form to see it work in action!
@If(@IsNewDoc; ""; @Return(StartDateTime));
newDateTime := @Now;
minutes := @Minute(newDateTime);
seconds := 0 - @Second(newDateTime);
REM "adjust time to the next 15 minute interval";
FIELD StartDateTime := @If(minutes > 45; @Adjust(newDateTime; 0; 0; 0; 0; 60 -
minutes; seconds); minutes > 30; @Adjust(newDateTime; 0; 0; 0; 0; 45 - minutes;
seconds); minutes > 15; @Adjust(newDateTime; 0; 0; 0; 0; 30 - minutes;
seconds); minutes > 0; @Adjust(newDateTime; 0; 0; 0; 0; 15 - minutes; seconds);
@Adjust(newDateTime; 0; 0; 0; 0; 0; seconds));
MinuteDur := @GetProfileField("CalendarProfile"; "DefaultDuration");
MinuteDuration := @If( (MinuteDur <= 0) | (MinuteDur = ""); 60 ; MinuteDur);
FIELD EndDateTime := @Adjust(StartDateTime; 0; 0; 0; 0; MinuteDuration; 0);
StartDateTime
Requires Free Membership to View
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
This was first published in November 2000