PROGRAM TEST B98
FB : LIB.CORE.V1_0.B98_TOTAL_SECONDS_TO_TIME_DATE;
The block converts the total seconds starting at 1.1.1970, 0:00, to seconds, minutes, hours etc.
|IN||DT||Input of DateTime value|
|WDAY||SINT||Day of week (0 = Sunday, 1 = Monday, ..., 6 = Saturday)|
|REMAINDAY||INT||Days remaining until the end of the month (last day: remainday = 0)|
The block converts the total time in (starting at 1.1.1970, 00:00), into other units The resulting outputs are sec, min, hour, day, mon, and year. For example, for in=3600 the outputs are sec=0, min=0, hour=1, day=1, mon=1, year=1970. Apart from this, the wday output shows the day of week (0 = Sunday, 1 = Monday, ..., 6 = Saturday).
Note that the input values are in UTC format. If in < 0 then it is supposed that in = 0.
The block, together with B97, is used as an auxiliary block for various time/date conversions, calculating of time spans etc.