Update cookies preferences

TimeFromDbNetV - method of the AtouchX object

Converts time from DbNet format to VB or JS format
The DbNet information system stores the date and time with the precision 1sec 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.
Integer TimeFromDbNetV(Integer DbNetTime, Variant DateTime)
DbNetTime(Integer) Converted time value in the DbNet format.
DateTime[for read and write] (Variant) Variable where the conversion result is stored (VB - Date, JS - Double).
Return value:
DbNet time 1238246520 is equal to the time 2019.03.28 13:22:00.000.
In the VBScript language, this value is of the Date type.
In the JavaScript language, it returns the 43552.5569444444 value of the Double type.
JavaScriptVBScriptSelect and copy to clipboard

var oATC = pMe.Pm("/AtouchApp").Acx;
var nDbNet = 1238246520;
var mData = Pm.CreatePmMap();
mData.ParValue = 0;
var nState = Pm.CallAxMethod("", oATC, "TimeFromDbNetV Value=", nDbNet, mData);
Pm.Debug("AtouchX.TimeFromDbNetV Value=" + mData.ParValue);   // 43552.5569444444
Pm.Debug("AtouchX.TimeFromDbNetV Date=" + Pm.FormatDate(mData.ParValue, 1));   // 2019.03.28 13:22:00.000
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

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