Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
thierrytt
Partner
Partner

Pick up "Date Modified" of a XLS file

Hi all,

I have a question concerning the "Date Modified" data of a file on Windows.

I'd like to pick up this "Date Modified" field from an XLS file and I don't find how to do this.

In my "table" excel, I'd like to add a field called "Last update" (of this file)

Thank you for your ideas,

Thierry

5 Replies
TigerisBack
Champion
Champion

= 'lastupdated on: &Reloadtime()

might help you

or

take

='lastupdated on: & date(max(datefield))

thierrytt
Partner
Partner
Author

Thx,

But I'd like to integrate the name of the Excel file, not QVW file.

Any other ideas?

TigerisBack
Champion
Champion

in excel load statement write

filename() as filename

and reload

then write

=filename&'   lastupdated on: ' & date(max(datefield))

hope this helps

gerritduits
Contributor
Contributor

I have found an answer here:
http://www.mrexcel.com/archive/Dates/17403b.html

You can add this as a User Defined Function:
Public Function ModDate() ModDate = Format(FileDateTime(ThisWorkbook.FullName), "m/d/yy h:n ampm")
End Function

=ModDate() will give you the last modified timestamp. You can cross reference this timestamp with your QVW ReloadTime().

blackmon
Contributor III
Contributor III

I know this is an old thread, but I had the same issue just now and was looking for an answer.

I used the QlikView FileTime method.

From QV Help, v. 11...

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.