Promotic

TimeToDbNetV - method of the AtouchX object

Description:
Converts time from VB or JS format to DbNet format.
The DbNet® information system stores the date and time to the nearest 1s as the number seconds since 1 January 1980 midnight. The value is stored at 32 bits and with it it is possible to define a range from 1.1.1980 to 7.2.2116.
Syntax:
Integer TimeToDbNetV(Variant DateTime, Long DbNetTime)
Parameters:
DateTime(Variant) The value of converted time in (VB - Date, JS - double).
DbNetTime[for read and write](Long) Variable where the result of the conversion in the DbNet format is stored.
Return values:
Example:
DbNet time 1238246520 is equal to time 2019.03.28 13:22:00.000 (43552.5569444444).
JavaScriptVBScriptSelect and copy to clipboard

var oATC = pMe.Pm("/AtouchApp").Acx;
var nDateTime = 43552.5569444444;
var mData = Pm.CreatePmMap();
mData.ParValue = 0;
var nState = Pm.CallAxMethod("", oATC, "TimeToDbNetV", nDateTime, mData);
Pm.Debug(mData.ParValue);   // DbNetTime = 1238246520
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.