Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why is date type field formatted in different ways?

I have a solution that consist of three loading levels. First level is to extract the raw data from several databases and store it into QVD files. Second level is to load that QVDs again, aggregate the data and store it again into different QVD files. In level three all QVDs of level two are loaded, then do some calculation and store it again into another QVD.

For some reason, when I load the QVDs of level two then I can see real date type fields. That means it shows me e.g. 12/04/2012. So, that's fine for me. But when I load the QVDs of level three then it's formatted into integer, e.g. 41011.

I know that QlikView internally converts date fields into integers starting at 01/01/1900 and calculates the date at run time. But I'm wondering why it's displayed differently although both are loaded from QVD and nothing happened to these fields in the meantime.

This behaviour leads to problems when you compare a date type field to other date type values, because '12/04/2012' <> '41011'. I know that I can convert it back using Date() function, but it shouldn't be different at all.

Anyone who can imagine where this is coming from?

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Hard to say without seeing the scripts.I would look clesely at the processing at all three levels to see if there is some small difference in the way the dates are being handled. Are you creating the dates in Level2?

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I worked through all the different levels several times. There is no difference. It's just a date field pulled from an SQL database, stored into a QVD file, loaded again (works), stored again, loaded again (works), stored again and then loaded again and it's formatted in a different way.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Did you made any operation to the date like +1,-1 to the date before storing in to qvd?

celambarasan

Not applicable
Author

Nope.

Not applicable
Author

My first idea was that it has something to do with keys or calendar creation that are done in level three. But I also looked at the data when it was just loaded from the QVD and it's almost wrong when it's just loaded into a plain table.