Date-Time Functions
The Date-Time functions are used for the date-time read and write operations of the system where the inSCADA Platform is installed.
Get System Date-Time
Date ins.now()
Returns the system time.
Return Value: Returns the return value of Java Date Object.
Syntax
var year=1900+ins.now().getYear();
var month=ins.now().getMonth()+1;
var day=ins.now().getDate();
var hour=ins.getHours();
var minute=ins.getMinutes();
var second=ins.getSeconds();
return "Date Time : "+day+"/"+month+"/"+year+" "+hour+":"+minute+":"+second;
Set System Date-Time
ins.setSystemDateTime(Long ms)
Changes the system time.
ms: The number of milliseconds since midnight January 1, 1970.
Return Value: Does not return any value.
Syntax
var dt=new Date();
dt.setHours(5);
ins.setDateTime(dt.getTime());
Last updated