Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why did date format of attribute in crosstable get changed to string?

Hi,

I am relatively new to QlikView and this is my first question -- would appreciate help.

I imported into QV a crosstable from EXCEL with dates being the attribute containing the data.  Somehow, the attribute (I renamed 'WeekDate') became a string and I cannot perform any date function on it.  Example:  The date '11/25/2011' gets imported and reformated into the string '40879.000000'? 

The script looks as follows:

 

CrossTable(WeekDate, Sales, 7)
LOAD *

Do I need to convert WeekDate, and if so, how?

Thanking in advance for your help,

Anthony

1 Solution

Accepted Solutions
swuehl
MVP
MVP

3 Replies
swuehl
MVP
MVP

Please check out this thread:

http://community.qlik.com/message/267104#267104

Regards,

Stefan

Not applicable
Author

Thank you for the prompt response and link to the discussion thread.

I was able to use the info to change my script and got the data loaded successfully.

It was very beneficial to learn the following:

"As whiteline points, all field names converted to values in the Crosstable() load will be stored as literals of texts, instead of numbers. Dates in QlikView are numeric, so you need a second load to transform the values correctly."

Thanks again,
Anthony

justaqlikker
Contributor III
Contributor III

Thank you Stefan and Anthony!  I was completely missing the fact that my date headers were coming in as a text/string data type.  Once I put the "Num#()" function on field in a resident load (after the CrossTable() load) everything fell into place and my date functions started working!  Thank you!