inSCADA
EN
EN
  • Introduction
  • Getting started
  • User Interface
    • Home
    • Development
      • Projects
      • Connections
      • Devices
      • Animations
        • Get
        • Color
        • Rotate
        • Move
        • Opacity
        • Bar
        • Click
        • Tooltip
      • Alarm Groups
      • Alarms
      • Scripts
      • Expressions
      • Variables
      • Reports
      • Processes
      • Mail
      • Import/Export
    • Wizards
      • Gas Metering
      • HPP Unit
      • Device Library
    • Visiualisation
    • Processes
    • Control Panel
    • Project Map
    • Variable History
    • Alarm History
    • Alarm Monitor
    • Trend Graphics
    • Reports
    • Logs
    • Auth Logs
    • Jobs
    • Users
    • Help
    • About
    • License
  • Mimic Design
  • Communication Protocols
    • MODBUS
      • Modbus TCP
      • Modbus UDP
      • Modbus RTU Over TCP
      • Modbus TCP Server
      • Modbus RTU Slave Over TCP
    • DNP3
      • DNP3 Master
      • DNP3 Outstation
    • PROFINET
    • IEC-104
    • SNMP
    • OPC
      • OPC UA Client
  • Programing
    • APIs
      • Variable Functions
      • Connection Functions
      • Project Functions
      • Alarm Functions
      • Script Functions
      • In-Memory DB Functions
      • System Functions
      • User Functions
      • Date-Time Functions
      • String Functions
      • Notification Functions
      • Confirmation Functions
      • Database Functions
      • Other Functions
  • Database
  • Usefull Features
  • Update Logs
  • Architectures and Applications
  • Development Roadmap
  • Migration to inSCADA
  • Licensing Policies
  • FAQ
  • Screenshots
  • Auxiliary Tools
  • Installations
    • Requirements
    • Installation on Linux
Powered by GitBook
On this page
  • Get System Date-Time
  • Set System Date-Time
  1. Programing
  2. APIs

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());
PreviousUser FunctionsNextString Functions

Last updated 5 years ago