Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

StringFromTimeLocal() Function

  • Last UpdatedApr 20, 2017
  • 1 minute read

Converts a timestamp to a time and returns the result as a string.

Syntax

result = StringFromTimeLocal (timestamp, format)

Parameters

timestamp

The number of seconds that have passed since midnight of January 1, 1970. A literal integer value, integer tagname, or integer expression.

format

Determines how the string result is shown. A literal integer value, integer tagname, or integer expression in the range from 1 to 5 with following meaning:

1 - Shows the date according to the format set in the Regional Settings of the local operating system

2 - Shows the time according to the format set in the Regional Settings of the local operating system

3 - Shows the date and time as a 24 character string (ddd mmm dd hh:mm:ss yyyy)

4 - Shows the day of the week in short form

5 - Shows the day of the week in long form

Example(s)

This script returns "1/2/70"

StringFromTimeLocal(86400,1)

This script returns "12:00:00 AM"

StringFromTimeLocal(86400,2)

This script returns "Fri Jan 02 00:00:00 1970"

StringFromTimeLocal(86400,3)

This script returns "Fri"

StringFromTimeLocal(86400,4)

This script returns "Friday"

StringFromTimeLocal(86400,5)

TitleResults for “How to create a CRG?”Also Available in