Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Pb with max in QVD local / server

Hi everyone,

I created a QVD with data sales  by month .

I have used an attribute YearMonth to stock the month with format (YYYYMM , example 201105).

After, I want to read my QVD to make incremental loading . Therefox i search a max(month) with this script

    maxtimes:

    LOAD

       max(anneemois) as MAXCRTTIME

    FROM

    QVD\Data.qvd (qvd);

    Let MAXCRTTIME = date(Peek('MAXCRTTIME',0,'maxtimes'),'YYYYMM');

In local , MAXCRTTIME contains 201105

With a Server, MAXCRTTIME contains a number 40672,803 !

Have you an idea to help me , please ?

Thnanks for advance,

Pierrick

Tags (2)
1 Solution

Accepted Solutions
deepakk
Valued Contributor III

Pb with max in QVD local / server

Strange... Check the server System Date and Time Setting and compare it with your local one.

Also try this out.

Let MAXCRTTIME =date(date#('MAXCRTTIME',0,'YYYYMM'),'YYYYMM');

I hope this heps you out..

Best of Luck..!!!

Deepak

3 Replies
deepakk
Valued Contributor III

Pb with max in QVD local / server

Strange... Check the server System Date and Time Setting and compare it with your local one.

Also try this out.

Let MAXCRTTIME =date(date#('MAXCRTTIME',0,'YYYYMM'),'YYYYMM');

I hope this heps you out..

Best of Luck..!!!

Deepak

pat_agen
Valued Contributor

Pb with max in QVD local / server

hi Pierrick,

Firstly are you sure you are looking in the correct place or atthe right thing?

You have recovered a field from your qvd file and called this MAXCRTTIME. You then have created a variable with the same name MAXCRTTIME.

You now have one field and one variable. The same name but two different elements in your qvw.

If you open a list box and display the field you will see 40672,803 which looks like a timestamp displayed as a number, if displayed as a timestamp this would show 2011/05/09 19:16:19.

If you create a text box and put inside it =MAXCRTTIME (this is the variable) you will see 201105.

Maybe this is your problem, in which case you don't have one.

I thought there may be an issue of different settings between the server and your workstation but can't see one.

Hope this helps

Not applicable

Pb with max in QVD local / server

I checked Configuration System Server ,Date and Time Setting . It was same configuration .

So , i Tried this rule in my script and It Works !!

Let MAXCRTTIME = Date#(Date(Peek('MAXCRTTIME',0,'maxtimes'),'YYYYMM') ,'YYYYMM')   

Thanks Deepak  

Community Browser