06-28-2016 01:53 PM
Hello:
Ive found similar posts but nothing seems to be relevant to what I'd like to do in DIAdem 2012.
I'd like to pull a date and time stamp from a data set in order to show exactly when the test was run. The data I am working with has a datetime channel but it is defaulted to a time in the past (coding errors from the hardware provider) so that information is useless to me.
The "Modify date" (in the details under the file browser in the Navigator Panel) is the exact date/time I want. Is there a way to call this value? Specifically, I'd like that value to propagate itself into a text box.
Thanks!
Solved! Go to Solution.
06-29-2016 01:06 AM
Option Explicit ' Pick a channel of your file dim chO : set chO = Data.Root.ChannelGroups(1).Channels(1) ' Deteremine filepath dim filePath : filePath = chO.Properties("sourcedatafilepath").Value & chO.Properties("sourcedatafilename").Value ' Use filesystem object to access file attributes dim modifiedDate : modifiedDate = CreateObject("Scripting.FileSystemObject").GetFile(filePath).DateLastModified MsgBox filePath & VBCRLF & CSTR(modifiedDate)
This code can be used to access the file system properties.
06-29-2016 07:01 AM
That works perfectly; thanks!!!