Anda di halaman 1dari 1

Date in eScript Background There are instances in which date arithmetic is required to implement certain businessrules.

Siebel eScript provides date functions that allow users to build custom functions toknow the difference between two dates, add/subtract a number of days to a date, etc.This document presents a set of functions that can be used in scripts to implement morecomplex business rules. Sample code provided in this document is provided only as a guideline, and not as afinal product to be used in a production environment. None of the functions performany validation (example: daylight savings adjustment) of the input parameters orerror trapping. The code is provided as a start point from which actual scripts canbe built, and is intended to show how some of the functions provided by eScript canbe used to perform more complex tasks.Date arithmetic functions in eScript function AddToDate(sourceDate, nDays, nHours, nMinutes, nSeconds,nsign){ // Parameters :// sourceDate : Date object// nDays, nHours , nMinutes , nSeconds : Integer numbers// nsign : Can have two values : 1 or -1// 1 indicates to ADD to the sourceDate// -1 indicates to SUBTRACT from the sourceDate// Returns : A date object, after adding/subtracting ndays,hNours,nMinute

Anda mungkin juga menyukai