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

AVEVA™ Historian

SetDuration

  • Last UpdatedNov 17, 2021
  • 1 minute read

The SetDuration method sets the time period for the trend as a duration relative to the current time.

Syntax

[Result=] aaHistClientTrend.SetDuration(real duration);

[Result=] aaHistClientTrend.SetDuration(DateTime duration);

Parameters

duration

The duration from the current time.

Remarks

When using the ActiveX version of the control, the duration parameter can be either a number of days or a date/time string.

When using the .NET version of the control, the duration parameter must be a valid DateTime value.

In both cases, when you specify a date/time value, the duration is the difference between the specified date/time and the base date of December 30th, 1899, 12:00:00 AM.

For more information on the format for date/time values, see DateTime.

Examples

In the following example, the duration is set to the past five minutes, relative to the current time.

#aaHistClientTrend1.SetDuration("00:05:00");

In the following example, the time period is set to the past 36 hours by specifying the number of days.

#aaHistClientTrend1.SetDuration(1.5);

In the following example, the duration is set to the past 36 hours by specifying a date/time value.

#aaHistClientTrend1.SetDuration("12/31/2018 12:00:00");

In This Topic
TitleResults for “How to create a CRG?”Also Available in