You are here: Core Reference > Coding > Scripting > Form.AddDateTime

Form.AddDateTime

The AddDateTime function allows the script to add a date/time field to the Form.

Syntax

Form.AddDateTime(X, Y)

Description

Adds a date/time selection field to the Form.

Arguments

X {integer}

Represents the horizontal position of the Date/Time field on the Form—the position on the 'X-Axis'.

 

Y {integer}

Represents the vertical position of the Date/Time field on the Form—the position on the 'Y-Axis'.

Returns

Date Time Control Object

DateTime Control Objects have common Control Object Properties as well as their own specific properties that can be used in the script (see DateTime Properties).

Example:

Set TimeStamp = Form.AddDateTime(1,1)

This adds a Date/Time field to the Form at coordinates 1, 1. The Control Object that is returned by the DateTime function is stored in the TimeStamp variable that is defined earlier in the script.


ClearSCADA 2015 R2