DateAdd - method of the Pm object
Returns a date to which a specified time-span has been added.
Date DateAdd(String interval, Long number, Date date)
|interval||(String) Specifies the added interval (type of time range):|
"Y" - year
"d" - day
"H" - hour
"M" - minute
"S" - second
|number||(Long) The number of interval you want to add. The number can either be positive number, for dates in the future, or negative number, for dates in the past.|
|date||(Date) Date to which interval is added.|
This method is functional also in Macro expression $.expr and in the onDraw event of the PmgCanvas object.
This method is also functional in Web panels.
The method can be used to add or subtract a specified time interval from a date. For example, it can be used to calculate a date 30 days from today or a time 45 minutes from now.
var tDate = Pm.DateAdd("m", 1, Pm.Time); //Returns the date from today in one month