In the PROMOTIC system, the
Date data type is used internally. It is also possible to use the auxiliary
PmDateObject object.
PmDate - date and time in the PROMOTIC internal numeric form:
(
Date data type) is used internally in the PROMOTIC system, and also in the scripting interface of
Pma objects. Because it is a simple numeric value, it can be easily used in scripts (read, write, save, transfer to other scripts, etc.). However, if it is necessary to execute more complicated operations with the date and time (time shifts, formatting for displaying, etc.), then it is handy to create an auxiliary
PmDateObject object with the
PmDate value.
JavaScript
Time in this language is in the PROMOTIC system used as a real number of the
Double type (the value is the number of days since
30.12.1899).
The
JavaScript language has its own
Date() object, but it is not recommended to use in the PROMOTIC system.
The time operations follow:
VBScript
In order to work with date and time, the
VBScript uses the
Date data type, which is in fact a real number of the
Double type (the value is the number of days since
30.12.1899).
Date and time can be created by several ways, see
Now,
Date,
Time. Other options
Notes for Date data type:, etc.
The time operations follow:
Some other PROMOTIC methods using date and time
Pm.CreateDate - Creates date and time from its individual components
Date and time formatting:
For formatting and scanning it is recommended to use the
PmFormat object - see
Examples for DateTime type.
However, older methods can also be used: