Qlik Community
Collaborate with over 60,000 Qlik technologists and members around the world to get answers to your questions, and maximize success.
Join UsThe date data had the following format:
1/02/19 4:00 PM GMT -05:00 US/Canada Eastern
12/25/18 1:00 PM GMT -05:00 US/Canada Eastern
The data load script was initially using the left function to trim the timestamp data to get the date information. This is not a good technique when the data being loaded is not always uniform number of characters for days, months and years. For this specific example, when the data had months with double digits, this caused the script to no longer work properly and those dates with double digit months were displaying as null in the chart.
A better technique for this situation is to use the subfield function which can be used to get part of a string based on delimter.
Here is a link to the Nov 2018 QlikView Subfield documentation on help.qlik.com.
The expression used in the load script to get the date to show correctly in the chart was:
Date(Date#(SubField([End Date],' ',1), 'MM/DD/YY'), 'MM/DD/YYYY') as [YourDateField],
The subfield was used to get the left most part of the string, up the first space. Then the date and dat# functions were used to ensure that the data was date and displayed with the desired MM/DD/YYY format. This worked for this scenario and properly handled the single digit and double digit months.
The date and date# functions are used to interpret the data and format the display of the date information. This is covered in the following community post: date and date# functions. There are additional examples on the help.qlik.com site for date#() and date(). Links to the Nov 2018 QlikView version are given here as an example.
Collaborate with over 60,000 Qlik technologists and members around the world to get answers to your questions, and maximize success.
Join UsSearch Qlik's Support Knowledge database or request assisted support for highly complex issues.
Submit a caseExperiencing a serious issue, please contact us by phone. For Data Integration related issues please refer to your onboarding documentation for current phone number.
Call Us