DIAdem Help

Object: UsiTimeDisp

  • Updated2024-09-12
  • 2 minute(s) read

Object: UsiTimeDisp

The USITimeDisp object provides date and time information.

The following example executes a search and displays the name and creation year of the files it finds:

VBScriptPython

 

Dim oMyCurrDataProvider, oMyConditions, oMyQueryForm, oMyResultsList, Element, oMyTime
Set oMyCurrDataProvider = Navigator.Display.CurrDataFinder
Set oMyQueryForm = oMyCurrDataProvider.QueryForm
Call oMyQueryForm.Clear()
oMyQueryForm.Mode = eAdvancedQueryForm
oMyQueryForm.ReturnType = eSearchFile
Set oMyConditions = oMyQueryForm.Conditions
Call oMyConditions.Add(eSearchFile,"fileName","=","Brake*")
Call oMyQueryForm.Search()
Set oMyResultsList = oMyCurrDataProvider.ResultsList
For Each Element in oMyResultsList.ResultsElements
  If Element.IsKindOf(eSearchFile) Then
    Set oMyTime = Element.Properties("CreateTime").Value
    Call MsgBoxDisp("name: " & Element.Name & vbcrlf & "Year: " & oMyTime.Year)
  Else
    Call MsgBoxDisp("No File") 
  End If
Next

Note  You can also create a USITimeDisp object with the CreateTime command.

Methods

GetLocalTime | GetUTC

Log in to get a better experience