5 Replies Latest reply: Apr 13, 2012 5:54 AM by einsTeIn.NET RSS

Why is date type field formatted in different ways?

einsTeIn.NET

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?