TimePeriodDuration property
Returns or sets the duration for the current time period. To set this property, the TimePeriodAbsoluteMode property must be set to False. Read/write. String.
Syntax
DataGrid1
.TimePeriodDuration
[ = value
]where
DataGrid1
- is the name of a data grid object or an expression that evaluates to a data grid object.value
- is a parameter of the type String. This string represents the relative amount of time from the current time.Relative times are specified in the format
Nu
where:- N - duration
- u - duration units.smeans seconds,mmeans minutes,hmeans hours,dmeans days, andwmeans weeks.
Examples of relative times:
- 30s: means last 30 seconds
- 10m: means last ten minutes
- 2h: means last two hours
- 3d: means last three days
- 1w: means last one weekTIP:If database is configured as the data source, the specified relative time value must be equal to or greater than the minimum unit of the data type. For example, for datetime or time, the minimum unit of relative time value is minute; for date, the minimum unit is day.
The value returned for the TimePeriodDuration property will be in the format of
d.HH:MM:SS
where:- d - Days
- HH - Hours
- MM - Minutes
- SS - Seconds
Example
Private Sub SetTimePeriodDuration() DataGrid1.TimePeriodAbsoluteMode = False DataGrid1.TimePeriodDuration = "10m" DataGrid1.RefreshData End Sub
Provide Feedback