ParseTimeStepString Method (TimeIntervals Collection)


See Also     Example     Applies To    

 

The ParseTimeStepString method takes a time step such as "1m" and determines the double precision interval multiplier and returns an ITimeInterval object from a TimeIntervals collection.

Syntax

object[.ParseTimeStepString](IntervalStep, LocaleIndependent, StepSize)

The ParseTimeStepString method syntax has these parts:

Part Description
object An object expression that evaluates to an ITimeIntervals2 interface.
IntervalStep An expression that specifies a member of the collection, as described in Settings.
LocaleIndependent A boolean that indicates whether the passed time step string contains an interval in the current locale or not.
StepSize A double representing the multiplier for the returned interval.

Remarks

The IntervalStep may contain a leading "+" or "-".

The ITimeInterval object returned from ParseTimeStepString does not retain the same value for the LocaleIndependent flag passed into the call. Any call to a string property of the ITimeInteval object must pass the LocaleIndependent flag of true if the default value of false is not desired.

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error Description
tseFRACTIONSNOTALLOWED Fractional intervals are not allowed.
tseNAMENOTFOUND The specified interval name was not found.

Enabling Operational Intelligence