DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Cant access "Modify Date" property of data set

Solved!
Go to solution

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!

0 Kudos
Message 1 of 3
(3,688 Views)
Solution
Accepted by topic author AlexVander
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.

 

0 Kudos
Message 2 of 3
(3,675 Views)

That works perfectly; thanks!!!

0 Kudos
Message 3 of 3
(3,664 Views)