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

Edge HMI

GetHSTInfo

  • Last UpdatedOct 29, 2026
  • 1 minute read

Returns the Start Time, End Time, and Duration of the specified history (*.hst) file.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

GetHSTInfo

File

Synchronous

Yes

Supported

Supported

Not supported

Supported

Not supported

Syntax

GetHSTInfo(strFileName,numInfoType)

strFileName

The file path and name of the history file to be read.

Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).

numFormat

A numeric flag specifying the type of information to be returned:

  • 0: Returns the Start Time of the file.

  • 1: Returns the End Time of the file.

  • 2: Returns the Duration (in hours) of the file.

Returned value

If the file cannot be read or the specified information cannot be returned, then an error is generated:

-1

Failed to retrieve the Start Time; verify the history file exists and is valid.

-2

Failed to retrieve the End Time; verify the history file exists and is valid.

-3

Internal program error; please contact Technical Support.

-4

The Studio TCP/IP server returned a Time that is incompatible with the format specified in the project screen or Web page. Please use the Verify Project tool to update the project and try again.

Examples

Tag Name

Expression

Tag

GetHSTInfo( "batch", 0 )

Tag

GetHSTInfo( "hst/02060801.hst", 1 )

Tag

GetHSTInfo( "C:\batch.bat", 2 )

In This Topic
Related Links