InputString is a Read/Write property used for setting the object's time based on a string representing wall clock time. When retrieved this property contains the string used to set the object's time (as opposed to the formatted OutputString). If the object's time is set using any other property (UTCSeconds, LocalDate or UTCFileTime) this string is cleared.
The object placeholder is an object expression that evaluates to a PITimeFormat object.
The time properties OutputString, LocalDate, UTCSeconds or UTCFileTime for the passed InputString are evaluated when the property InputString is set for a PITimeFormat object. For a DynamicTime object, the passed InputString is checked for validity when set, but evaluation occurs whenever one of the object's time properties is retrieved. Therefore, the time for the InputStrings "*", "Today", "Yesterday" is constant for PITimeFormat, but varies for a DynamicTime depending on when it is called.
The LocaleIndependent property determines if localized time strings are used in parsing. When set to true the time string is parsed as a PI time format, expecting time strings for month, weekday, "Today" and "Yesterday" in English. When set to false, local regional settings govern the parsing including date-time format preferences. If locale specific parsing fails PI time string parsing is also attempted even when LocaleIndependent is false. Since PI time strings expect a date format of day-month-year, this may cause ambiguity in cases where the date format for a machine's locale is different. Therefore, when specifying PI time strings with LocaleIndependent false, four digit years should be used to prevent ambiguity.
The supported string formats are relative times, combination times, absolute times, where the absolute times may be one of PI time, ISO 8601 time and local system time as indicated by regional settings. Examples of each type are shown below. An absolute time may be enclosed in quotes. Any string not enclosed in quotes will be checked for relative formats and absolute time formats.
PI time formats (for example 23-Jun-02 14:23:01) have been extended from the PI-API syntax to include fractional seconds (day-month-year h:m:s.fraction) and optionally a 4 digit year. If a leading date is not entered, the current date is assumed. If a trailing time is not entered, zero is assumed for the hour, minute and seconds. The year may be a two digit or four digit year. The date portion (day-month-year) need not be fully specified. The following combinations are supported for the date portion of the string.
Relative time formats (for example +1h) and combination time formats (for example *+1h), may be formatted as,
Local system time formats may contain month and day strings localized by the operating system, configurable ordering of the date, configurable date separators and configurable time separators. The local system time format has been extended to allow a fractional second to be specified. The date and time portions of the string can take the partial formats described under the PI time formats section.
ISO 8601 time format (for example 1995-12-31T23:59:59.3) adds a "T" to separate the date and time instead of a space. The order of the date is year-month-day.
In addition to generic errors (such as Out of Memory), the following errors may occur:
|tseFRACTIONSNOTALLOWED||Fractional intervals are not allowed.|
|tseNAMENOTFOUND||Name not found in collection|
|tseTIMEINVALID||The time is invalid.|