Previous Topic

Next Topic

Book Contents

Book Index

_CalculateDateTime

Calculates a new date and time by adding an interval to or subtracting an interval from another date and time. The interval is based on a date part, for example, a number of days.

Syntax

_CalculateDateTime(date,interval,datePart)

Parameters

Parameters for _CalculateDateTime

Parameter

Definition

Data type

date

Original date and time.

PFDateTime

interval

Time interval to add to or subtract from the original date time.

Integer

datePart

Date part to which the value specified in the interval parameter is added.

Integer

Returns

New date time (PFDateTime).

Notes

Example

This example sets a date for follow-up that is four weeks after the initial date entered. Both items are on the same form, so the rule is created at the form level. There is no enumeration for weeks in DateTimeParts, so the rule uses twenty-eight days instead of four weeks.

evaluate on Form Submission

value = _CalculateDateTime(this.InitialExamDate.Value, 28, DateTimeParts.Days)

always

set this.FollowupExamDate.Value = value

Copyright © 2013 Oracle and/or its affiliates. All rights reserved.