GetHstInfo

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

Function Group Execution Windows Embedded Thin Client
GetHstInfo File Synchronous Supported Supported Supported

Syntax

GetHstInfo(strFileName,numInfoType)
strFileName
The file path and name of the history file to be read.
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 )