Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Object PmDateObject (PmDateObject)

Description:
The auxiliary object that is used for date and time operations, especially in JavaScript panels. PROMOTIC internally works with date and time in the form of PmDate - date and time in the PROMOTIC internal numeric form (real number). This PmDate format is used by majority of scripting methods of the PROMOTIC objects. If it is necessary to execute more complex operation with the date/time, or to transform it to a string that can be displayed in desired format, then it is handy to transform the date/time from the PmDate form to an auxiliary PmDateObject object.
 
Creating of object:
JavaScriptSelect and copy to clipboard

var d = Pm.CreatePmDateObject();  //Creates the object with current time
 
or
JavaScriptSelect and copy to clipboard

var d = Pm.CreatePmDateObject(tDate);
Properties and methods:
Format Creates a text string containing date and time
GetValue Returns the R8 value (VBScript value) of the PmDateObject object.
SetValue Sets the PmDateObject object as a result of conversion of the data value of the VBScript language
SetDateTime Sets the PmDateObject object to desired year, month, day, ...
GetYear Year (integer)
GetMonth Month (integer 1-12)
GetWeekday day of the week (integer 0-6)
GetDay Day of the month (integer 1-31)
GetHour The hour of the day (integer 0-23)
GetMinute The minute of the hour (integer 0-59)
GetSecond The second of the minute (integer 0-59)
GetMillisecond the millisecond of the second (integer 0-999)
SetYear Sets the PmDateObject object to desired year, month, day, ...
SetMonth Sets the PmDateObject object to desired month, day, ...
SetDay Sets the PmDateObject object to desired day.
SetHour Sets the PmDateObject object to desired hour, minute, second and millisecond
SetMinute Sets the PmDateObject object to desired minute, second and millisecond
SetSecond Sets the PmDateObject object to desired second and millisecond
SetMillisecond Sets the PmDateObject object to desired millisecond
PROMOTIC 9.0.0 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice