Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
Can anybody explain in the following in brief:
time vs time#
date vs date#
num vs num#
timestamp vs timestamp#
Thanks in advance
Basically,
Num() - changes format only (without making any change in the original backend data)
Num#() - parses/reads the data according to mentioned format.
Read this: Re: Num vs num #
The rest are similar.
time() is only about the format (kind of 'layouting' the value)
time#() is about interpreting...telling QlikView that this string is actually a Time/Date/Timestamp... only if QlikView interprets a field/value correctly you can use it properly and formatting it with time()
num()chnages the format,num#()changes the data according given format
time() changes the time format
Date#() is used to convert a Text/String into a Number with a specific format
Date( ) is used to format a number to specific format
Look at the below example...
Considering you have below Default Date Format in you script
SET DateFormat='DD/MM/YYYY';
Now Take an example of below sample code
Load * Inline
[
InvoiceDate
14-05-2014
];
Create a Text Box in your UI and write below
=NUM(InvoiceDate)
You will get - even though QlikView consider InvoiceDate as Number
Because your default date format is DD/MM/YYYY and QlikView can't match DD-MM-YYYY and DD/MM/YYYY. So we need either to change the Default Date Format or need to tell QlikView that InvoiceDate is actually a Date.. How?
Use below in your Script
Load
Date(Date#(InvoiceDate,'DD-MM-YYYY')) as InvoiceDate
Inline
[
InvoiceDate
14-05-2014
];
This will convert InvoiceDate to the Date Format as per your Script... i.e. 14/05/2014
Now if use =NUM(InvoiceDate) in you text box you will get actual number corresponds to the InvoiceDate
We can directly use as below in your Text Box
=NUM(Date#(InvoiceDate,'DD-MM-YYYY'))
============================================
Same way we can use TimeStamp, Time and Num....
Hope this would be helpful...