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

Is there a way to get the date of execution of a qvd into a qvw?

Hi All,

I have a requirement where I need to get the date and time of a qvd which reloads everyday into another qvw file. Is it possible. If so how?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Look into the 'file functions in script' chapter in the HELP:

QVDCreateTime( filename )

or

FileTime( filename )

View solution in original post

5 Replies
Anonymous
Not applicable
Author

You could create an seperate qvd that just contains the qvd name and the date using the today() function and then read that qvd in your qvw.

swuehl
MVP
MVP

Look into the 'file functions in script' chapter in the HELP:

QVDCreateTime( filename )

or

FileTime( filename )

Anonymous
Not applicable
Author

Never knew that function existed - learnt something new today.  Thx.

Anonymous
Not applicable
Author

Hi swuehl,

Thank you, that worked.

effinty2112
Master
Master

Hi Uday,

                    A fun way to get this kind of info into your qvw is to extract qvd metadata . You load this separately from the data. Use the wizard as if you're going to load from the qvd as normal but change the "File Type" selection from "Qvd" to "xml".

You can load all sorts of interesting stuff  but for the fairly simple info you're wanting I would let the wizard generate the script and then edit out everything except the script that generates the QvdTableHeader info. The script will look like this except for the last line which identifies the path to the qvd file in question:

QvdTableHeader:

LOAD QvBuildNo,

    CreatorDoc,

    CreateUtcTime,

    SourceFileSize,

    TableName,

    RecordByteSize,

    NoOfRecords,

    Offset,

    Length,

    %Key_QvdTableHeader_B94FCCAC68ED3E20    // Key for this table: QvdTableHeader

FROM (XmlSimple, Table is [QvdTableHeader]);

You'll get the qvd creation time plus other info that might be useful to you. Hope this is of interest.

Regards