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 values:
DbNet time 1238246520 is equal to the time 2019.03.28 13:22:00.000. In VBScript, this value is of the Date type. In JavaScript, it returns a value of 43552.55694444 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", nDbNet, mData);
Pm.Debug(mData.ParValue);   // 43552.5569444444
Pm.Debug(Pm.FormatDate(mData.ParValue, 1));   // 2019.03.28 13:22:00.000
PROMOTIC 9.0.24 SCADA system documentation MICROSYS, spol. s r.o.

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