Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
= 'lastupdated on: &Reloadtime()
might help you
or
take
='lastupdated on: & date(max(datefield))
Thx,
But I'd like to integrate the name of the Excel file, not QVW file.
Any other ideas?
in excel load statement write
filename() as filename
and reload
then write
=filename&' lastupdated on: ' & date(max(datefield))
hope this helps
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().
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.
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