makedate can be used in load script to combine date data from different fields, into one new date field. In the example below the year, month, and day data from fields transaction_year, transaction_month, and transaction_day are combined into a new field called Transaction Date.
In the Data load editor, create a new section, and then add the example script and run it. Then add, at least, the fields listed in the results column to a sheet in your app to see the result.
Load script
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=0;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';
Transactions:
Load
*,
MakeDate(transaction_year, transaction_month, transaction_day) as "Transaction Date",
;
Load * Inline [
transaction_id, transaction_year, transaction_month, transaction_day, transaction_amount, transaction_quantity, discount, customer_id, size, color_code
3750, 2018, 08, 30, 12423.56, 23, 0,2038593, L, Red
3751, 2018, 09, 07, 5356.31, 6, 0.1, 203521, m, orange
3752, 2018, 09, 16, 15.75, 1, 0.22, 5646471, S, blue
3753, 2018, 09, 22, 1251, 7, 0, 3036491, l, Black
3754, 2018, 09, 22, 21484.21, 1356, 75, 049681, xs, Red
3756, 2018, 09, 22, -59.18, 2, 0.333333333333333, 2038593, M, Blue
3757, 2018, 09, 23, 3177.4, 21, .14, 203521, XL, Black
];
Results
Qlik Sense table showing results of the makedate function being used in the load script.
transaction_id |
Transaction Date |
3750 |
30/08/2018 |
3751 |
07/09/2018 |
3752 |
16/09/2018 |
3753 |
22/09/2018 |
3754 |
22/09/2018 |
3756 |
22/09/2018 |
3757 |
23/09/2018 |