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

AVEVA™ Plant SCADA

StringFromTime()

  • Last UpdatedJul 13, 2023
  • 1 minute read

Converts a time value (in seconds since January 1, 1970) into a particular string representation and returns the result.

Category

String

Syntax

StringResult = StringFromTime( SecsSince1-1-70, StringType );

Parameters

SecsSince1-1-70

Converted to the StringType specified.

StringType

Determines the display method. Possible values are:

1 = Shows the date in the same format set from the Windows Control Panel.

2 = Shows the time in the same format set from the Windows Control Panel.

3 = Shows a 24-character string indicating both the date and time: "Wed Jan 02 02:03:55 1993"

4 = Shows the short form for a day of the week: "Wed"

5 = Shows the long form for a day of the week: "Wednesday"

Remarks

The time value is UTC equivalent: number of elapsed seconds since January 1, 1970 GMT. The value returned reflects the local time.

Examples

StringFromTime(86400, 1); ' returns "1/2/1970"

StringFromTime(86400, 2); ' returns "12:00:00 AM"

StringFromTime(86400, 3); ' returns "Fri Jan 02 00:00:00 1970"

StringFromTime(86400, 4); ' returns "Fri"

StringFromTime(86400, 5); ' returns "Friday"

See Also

StringASCII(), StringChar(), StringFromIntg(), StringFromReal(), StringInString(), StringLeft(), StringLen(), StringLower(), StringMid(), StringReplace(), StringSpace(), StringTest(), StringToIntg(), StringToReal(), StringTrim(), StringUpper(), Text()

String Functions

In This Topic
Related Links