11-15-2010 07:11 AM
Hello All,
What do I need to read "Modify date" property value from my Datafinder resultlist?
result of:
Dim oMyDataFinder, oMyQuery, MyDate, MyMin, oMyResults
Set oMyDataFinder = Navigator.ConnectDataFinder("My DataFinder")
If oMyDataFinder.Name = "My DataFinder" Then
Dim AdvancedQuery
Set AdvancedQuery =Navigator.CreateQuery(eAdvancedQuery)
AdvancedQuery.ReturnType=eSearchFile
Call AdvancedQuery.Conditions.Add(eSearchFile,"aaaa","=", "*")
oMyDataFinder.Search(AdvancedQuery)
Set oMyResults = oMyDataFinder.Results
msgbox(oMyDataFinder.Results(1).Properties("modifyTime").value)
is err. number 438. "proprietà o metodo non supportati dall.oggetto"
oMyResults.count return 1
My property value is "11/15/2010 11:08:30".
Thanks,
Yustas
Solved! Go to Solution.
11-15-2010 07:20 AM
Hello Yustas,
for date/time properties an object called "UsiTimeDisp" is returned.
To print the date using msgbox please try
msgbox(oMyDataFinder.Results(1).Properties("modifyTime").value,variantdate)
Hope that helps,
Eva
11-15-2010 07:26 AM
Hello Eva,
it works
msgbox(oMyDataFinder.Results(1).Properties("modifyTime").value.variantdate)
thanks,
Yustas
11-16-2010 11:24 AM
Hi Yustas,
Note that if you request the DateTimeObject.VariantDate, then you are losing the millisecond and microsecond and nanosecond information stored in the DateTimeObject. You can alternatively request the entire object and read that info off as properties, if you need it...
Set Prop = ResultsList(1).Properties("DateTime") Set DateTimeObject = Prop.Value MsgBox DateTimeObject.Millisecond
Brad Turpin
DIAdem Product Support Engineer
National Instruments