[DATI] Date and time of day functions
Function block DATI adds a time period to a point in time on a specific day and/or subtracts a time period from the point in time on a specific day.
DATI adds or subtracts a time period to/from a point in time on a specific day. A time period can be added while simultaneously subtracting a time period. The result is provided on output [Out], split into values for date, time, year, month, day, day of week, day of year, hour, minute, second, and millisecond.
Input | Description | Data type | Default value |
|---|---|---|---|
In | Input | DateAndTime | 01.01.1990 |
TiAdd | Time to add | Time | 0 ms |
TiSub | Time to subtract | Time | 0 ms |
Output | Description | Data type | Default value |
|---|---|---|---|
Out | Output | DateAndTime | 01.01.1990 |
Da | Date | Date | 01.01.1990 |
TiDay | Time of day | TimeOfDay | 00:00:00.000 |
Year | Year | Integer | 1990 1990…2169 |
Month | Month | Integer | 1: January 1…12 |
1: January | |||
Day | Day | Integer | 1 1…31 |
Hour | Hour | Integer | 0 0…23 |
Minute | Minute | Integer | 0 0…59 |
Second | Second | Integer | 0 0…59 |
Mscnd | Millisecond | Integer | 0 0…999 |
DayWeek | Day of week | Integer | 1: Monday 1…7 |
1: Monday | |||
DayYear | Day of year | Integer | 1 1…366 |