Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Partner
Partner

How to show QVW creation date or update date?

Hi there!

While creation of QlikView application it is useful to see document update date or document creation date. It's not the ReloadTime() and now() or today(). I mean the property of file .qvw, that is shown in explorer window of OS. How to get this property to qlik application?

Tags (3)
8 Replies
Partner
Partner

Re: How to show QVW creation date or update date?

QvdCreateTime (qvd_file_name)

Partner
Partner

Re: How to show QVW creation date or update date?

Qlikview Help:

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')

Not applicable

Re: How to show QVW creation date or update date?

Try this:

Enable create log for app: Settings->User Preferences.

On General tab check option: "Flush Script Log Files After Each Write"

Then in Your Script paste this:

Log:
LOAD RowNo() as ID,
@1 as DataAkt,
@2 as HourAct
FROM

(
txt, unicode, no labels, delimiter is ' ', msq); //Change Destination of log file
Makt:
Load Max(ID) as Max Resident Log;
LET vMax = Peek('Max','0','Makt');
LET vData = Peek('DateAct',$(vMax),'Log');
DROP Table Makt;
END Sub

Then create a textbox item, and in the text field paste this:

= 'Last data update: ' & only({<ID={'$(vMax)'}>}DateAct) & ' ' & only({<ID={'$(vMax)'}>}HourAct)

Partner
Partner

Re: How to show QVW creation date or update date?

I got no answer.

QvdCreateTime shows QVD info. Not QVW or QVF file. From interface I can call function ReloadTime(). This function would show the time of Reload end. I can rename file or move it somewhere. After these operations Qlik.qvw would have ModifyDate. Do some one know how to get this date?

RSvebeck
Valued Contributor

Re: How to show QVW creation date or update date?

Use the function filetime()


Robert

Svebeck Consulting AB
Partner
Partner

Re: How to show QVW creation date or update date?

This function works only from load script. If I want to see that time in Qlik interface without reload I gues I should use macros.

atkinsow
Valued Contributor II

Re: How to show QVW creation date or update date?

I would think it would only change during reloads.

So if you use it in the script and assign it to a variable, you can then use the variable in your UI.

Partner
Partner

Re: How to show QVW creation date or update date?

Okay. During Script I can get this info. FileTime() would show me last modify date of file. It'll be less than ReloadTime() of QVW or QVF file. It can help me someway. Thanks.

But this time won't be real modify date of file. May be in future I'll find full answer for getting this file info.