Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to load the "last changed" date from files

Hello, I would like to load the "last changed" date of several qvd files. For example a file called Budget.qvd, last changed 2013-09-04 - then I would like "2013-09-04" as a value in a field in the QV app. Is this possible?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Are you referring to the last modification timestamp of the file or some internal data table?

If you are after the file timestamp, look into

filetime([ filename ])

Returns a timestamp for the date and time of the last modification of the file filename. If no filename is specified, the function will refer to the currently read table file.

Examples:

filetime( 'xyz.xls' )

Will return the timestamp of the last modification of the file xyz.xls.

Load *, filetime() as X from abc.txt ;

Will return the date and time of the last modification of the file (abc.txt) as a timestamp in field X in each record read.

or

QvdCreateTime(filename)

Returns the XML-header time stamp from a QVD file if any (otherwise NULL).

The filename is the name of a QVD file, if necessary including path.

Examples:

QvdCreateTime('MyFile.qvd')

QvdCreateTime('C:\MyDir\MyFile.qvd')

View solution in original post

4 Replies
swuehl
MVP
MVP

Are you referring to the last modification timestamp of the file or some internal data table?

If you are after the file timestamp, look into

filetime([ filename ])

Returns a timestamp for the date and time of the last modification of the file filename. If no filename is specified, the function will refer to the currently read table file.

Examples:

filetime( 'xyz.xls' )

Will return the timestamp of the last modification of the file xyz.xls.

Load *, filetime() as X from abc.txt ;

Will return the date and time of the last modification of the file (abc.txt) as a timestamp in field X in each record read.

or

QvdCreateTime(filename)

Returns the XML-header time stamp from a QVD file if any (otherwise NULL).

The filename is the name of a QVD file, if necessary including path.

Examples:

QvdCreateTime('MyFile.qvd')

QvdCreateTime('C:\MyDir\MyFile.qvd')

Anonymous
Not applicable
Author

Thanx, FileTime() was what I was looking for. Not really sure what QvdCreateTime() is. Is that when the store was initiated?

cesaraccardi
Specialist
Specialist

Hi,

If you move the qvd from a folder to another you will have a different result for FileTime() whereas QvdCreateTime() will still give you the date when data was stored into the file.

Regards,

Cesar

KAVURU
Contributor
Contributor

If we want to get the modified date for a particular record in a table then how to add?