Range for time and date_and_time data types on AC800M
what is the allowed Ranges for the time and date_and_time types in Control Builder / AC800M?
I could find the information about the basic types (dint, real etc.) but not about the time data type in the Online Help.
Actual Problem is that i have some calculations with long-running timers and i want to check for the limits and edge-cases...
Voted best answer
You can simply get "time" range by make zero division of two "real" type variables in the Control Builder (with follow conversion real-to-time): 0ms - 1000000000d23h59m59s999ms. This is less than "real" type can hold.
Similar for "date_and_time": working range from 1979-12-31-00:00:00.000 to 2100-01-02-23:59.59.999.
I believe time and date_time are 4Kb length but it musn't be considered as "real" or something... These data types have their own structure of bits.
Hope it helps...
The following characters can be used for setting the format date_and_time:
YYYY year input as four digits
YY year input as two digits
MM month input as two digits
DD day input as two digits
HH hour input as two digits
MI minutes input as two digits
SS seconds input as two digits
T tenths of seconds input as one digit
TT hundredths of seconds input as two digits
TTT milliseconds input as three digits
Example of initial values for a format variable: