Unless otherwise specified, the examples in this topic use the following date format: MM/DD/YYYY. The date format is specified in the SET DateFormat statement in your data load script. The default date formatting may be different in your system, due to your regional settings and other factors. You can change the formats in the examples below to suit your requirements. Or you can change the formats in your load script to match these examples.
Default regional settings in apps are based on the regional system settings of the computer or server where Qlik Sense is installed. If the Qlik Sense server you are accessing is set to Sweden, the Data load editor will use Swedish regional settings for dates, time, and currency. These regional format settings are not related to the language displayed in the Qlik Sense user interface. Qlik Sense will be displayed in the same language as the browser you are using.
Example 1 - System variables default
Overview
Open the Data load editor and add the load script below to a new tab.
The load script contains:
A datasetof dates that is loaded into a table named Transactions.
Load the data and open a sheet. Create a new table and add these fields as dimensions.
date
monthname
Create this measure
=sum(amount)
Results table
date
monthname
sum(amount)
01/01/2022
January
1000.45
01/02/2022
January
2123.34
01/03/2022
January
4124.35
01/04/2022
January
2431.36
01/05/2022
January
4787.78
01/06/2022
January
2431.84
01/07/2022
January
2854.83
01/08/2022
January
3554.28
01/09/2022
January
3756.17
01/10/2022
January
3454.35
The default LongMonthNames definition is used. In the load script, to create a field called, month, the Date function is used with the date field as the first argument. The second argument in the function is the formatting MMMM.
Using this formatting Qlik Sense converts the values from the first argument into the corresponding full month name set in the variable LongMonthNames. In the results table, the field values of our created field month display this.
Example 2 - Change system variable
Overview
Open the Data load editor and add the load script below to a new tab.
The load script contains:
A dataset of dates that is loaded into a table named Transactions.
A date field.
The LongMonthNames variable that is modified to use the abbreviated days of the week in Spanish.
Load script
SET LongMonthNames='Enero;Febrero;Marzo;Abril;Mayo;Junio;Julio;Agosto;Septiembre;OctubreNoviembre;Diciembre';
Transactions:
LOAD
date,
Date(date,'MMMM') as monthname,
id,
amount
INLINE
[
date,id,amount
01/01/2022,1,1000
02/01/2022,2,2123
03/01/2022,3,4124
04/01/2022,4,2431
];
Results
Load the data and open a sheet. Create a new table and add sum(amount) as a measure and these fields as dimensions:
date
monthname
Create this measure:
=sum(amount)
Results table
date
monthname
sum(amount)
01/01/2022
Enero
1000.45
01/02/2022
Enero
2123.34
01/03/2022
Enero
4124.35
01/04/2022
Enero
2431.36
01/05/2022
Enero
4787.78
01/06/2022
Enero
2431.84
01/07/2022
Enero
2854.83
01/08/2022
Enero
3554.28
01/09/2022
Enero
3756.17
01/10/2022
Enero
3454.35
In the load script, the LongMonthNames variable is modified to list the months of the year in Spanish. Then, to create a field called, monthname, theDate function is used with the date field as the first argument. The second argument in the function is the formatting MMMM.
Using this formatting Qlik Sense converts the values from the first argument into the corresponding full month name set in the variable LongMonthNames. In the results table, the field values of our created field monthname display the month name written in Spanish.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!