DATECALC
The DATECALC function modifies the input date and time string according to the defined specifications.
Input/Output
Number of Connections: Min: 1/Max:2
| Input | Data Type | Description |
| Input1 | DateTime | The original date and time. |
| Input2 | Integer | Sets the Calc property. (optional) |
| Output | Data Type | Description |
| Output1 | DateTime | The new date and time.
The specified Position of the original date and time string is incremented by the amount specified by the Calc property. |
Property
| Name | Property Type | Description |
| Position | choice | The position in the original date or time string to be incremented.
| Year | - |
increments the year
|
| Month | - |
increments the month
|
| Day | - |
increments the day
|
| Hour | - |
increments the hour
|
| Minute | - |
increments the minutes
|
| Second | - |
increments the seconds
|
|
| Calc | int | The value added to the specified Position in the original date and time string. A negative value (-) can be specified. |
| HolidayAction | choice | Specifies how to handle when the calculated date is holiday.
| None [0]
| - |
Output calculated date even if it's holiday.
|
| NextDay [1]
| - |
Output next non-holiday date.
|
| PrevDay [-1]
| - |
Output previous non-holiday date.
|
|
| Holiday | holiday | Specifies the holiday setting name created by FSMC. |
Topic
- Calculations are done according to the calendar format. For example, if adding a single day to the date "4/30", the result will be "5/1".
- Time value is kept when re-calculating the date by specified HolidayAction.
-
HolidayAction is only effective when valid Holiday is set.
Example
| Property | Output |
| Input 1 | 2002-12-31T00:00:00.000 | Position | Day | 2003-01-01T00:00:00.000 |
| | Calc | 1 | |