QueryDate Property (SDK Objects)


The PITime used to retrieve PIModule's in a PIModules collection from the database.




The object placeholder is an object expression that evaluates to a PIModule or PIModuleDB object.



The QueryDate is used to retrieve the modules in a PIModules collection from the database. The value of this PIModule used to do the retrieval is the one in-effect for the QueryDate. The returned PIModule's are the values in-effect for this date.  See the IPIVersion property for more details.


This property is read only. QueryDate is modified through the SetQueryDate method.


This property defaults to current time. The "current time" is represented by the QueryDate having a value of Nothing.


Once it is set, any PIModule's retrieved from the module's PIModules collection will have their QueryDate's set to this module's QueryDate.


This date is a short cut for obtaining the desired values of the subordinate PIModules of a PIModule. Set it to a time that makes sense for your application. For example, when getting the equipment for a PIUnitBatch, set it to the EndTime of the batch. Then the values of the PIModule's retrieved will have their EffectiveDate's at or before the end time of the batch.


The PIModuleDB object also supports the QueryDate property.

Enabling Operational Intelligence