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

AF SDK Reference

AFTable.QueryDate Property

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTable.QueryDate Property
This read-only property returns the date used to retrieve the version of an object.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public AFTime QueryDate { get; }
Public ReadOnly Property QueryDate As AFTime
	Get

Dim instance As AFTable
Dim value As AFTime

value = instance.QueryDate
public:
virtual property AFTime QueryDate {
	AFTime get () sealed;
}
abstract QueryDate : AFTime with get
override QueryDate : AFTime with get

Property Value

Type: AFTime
Returns the date used to retrieve the version of an object. A value of AFTime.MaxValue means that the query date has not been set and the latest versions of sub-objects are retrieved as long it does not have an ObsoleteDate specified.

Implements

IAFVersionableQueryDate

Remarks

The QueryDate is used to retrieve the version of objects from the AFDatabase. The version of the object used to do the retrieval is the one in effect at the QueryDate. The returned sub-collection of the object are the ones in effect for this date.

The value of this property can be set using the ApplyQueryDate(Object) method. This property defaults to current time. However, once it is set, any object retrieved from one of its sub-collections will have their QueryDate set to this object's QueryDate.

This date is a short cut for obtaining the desired versions of the subordinate objects. Set it to a time that makes sense for your application. For example, when getting the equipment for a AFElement, set it to the end time of the desired time period. Then the versions of the subordinate objects retrieved will have their effective dates at or before the end time of the element.

Version Information

AFSDK


See Also

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