Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
thierrytt1102
Partner - Creator II
Partner - Creator II

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

6 Replies
SunilChauhan
Champion II
Champion II

= 'lastupdated on: &Reloadtime()

might help you

or

take

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

Sunil Chauhan
thierrytt1102
Partner - Creator II
Partner - Creator II
Author

Thx,

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

Any other ideas?

SunilChauhan
Champion II
Champion II

in excel load statement write

filename() as filename

and reload

then write

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

hope this helps

Sunil Chauhan
Anonymous
Not applicable

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().

Anonymous
Not applicable

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.

tiagopost
Contributor III
Contributor III

In QDF we have a function call dodir(path)

in there you can see 

timestamp(FileTime( '$(vL.QDF.DoDirFile)' ),'$(TimestampFormat)') as '$(vL.QDF.QualifyFelds)DoDirFileTime'

meaning we can use function FileTime(filefullpath) to get last update of the file aparently