AdapterBaseParseTimeTag Method

Parses a string formatted as an absolute or relative time tag.

Definition

Namespace: Gemstone.Timeseries.Adapters
Assembly: Gemstone.Timeseries (in Gemstone.Timeseries.dll) Version: 1.0.171 -- Release Build+3ecaf8b66f8331a5e50f9e43ac234abd50096934
public static DateTime ParseTimeTag(
	string timetag
)

Parameters

timetag  String
String formatted as an absolute or relative time tag.

Return Value

DateTime
DateTime representing the parsed timetag string formatted as an absolute or relative time tag.

Remarks

Relative times are parsed based on an offset to current time (UTC) specified by "*".

The timetag parameter can be specified in one of the following formats:

Time FormatFormat Description
12-30-2000 23:59:59.033Absolute date and time.
*Evaluates to UtcNow.
*-20sEvaluates to 20 seconds before UtcNow.
*-10mEvaluates to 10 minutes before UtcNow.
*-1hEvaluates to 1 hour before UtcNow.
*-1dEvaluates to 1 day before UtcNow.
*+2dEvaluates to 2 days from UtcNow.

Exceptions

ArgumentNullExceptiontimetag parameter cannot be null or empty.
FormatExceptiontimetag does not contain a valid string representation of a date and time.

See Also