All data in QlikView and Qlik Sense is stored as dual values that consists of two components;
1. A text string, used for presenting the value.
2. A numerical value, either decimal or integer, used for calculations, selection and sorting
In a date value for example the visual date '2014-05-14' is stored in the text component of the dual value, and the numerical value is 41773 (which is equal to the number of days since 30 Dec 1899). The two components '2014-05-14' and 41773 both represent the same value, and together they describe the value properly.
'2014-05-14' without the underlying number is just a text that look like a date.
41773 without the text value is just a number, without any specific meaning.
Dual combines a number and a string into a single record, such that the number representation of the record can be used for sorting and calculation purposes, while the string value can be used for display purposes.For example:
let Startdate = num(timestamp#('2012/10/02 11:55:25 PM','YYYY/MM/DD hh:mm:ss TT'));
let Enddate= num(timestamp#('2012/10/03 01:55:26 AM','YYYY/MM/DD hh:mm:ss TT'));
avg((interval( [Later Time] - [Earlier Time], 'm'))) - this will return the average of the numerical componentavg(num#(interval( [Later Time] - [Earlier Time], 'm'))) - this will return the average of the real value
Attached screenshot and sample qvw file