Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have date format like shown below. How should I read this in QV.
Date:
14/5/2016 |
04/05/16 |
29/4/2016 |
01/05/16 |
30/4/2016 |
31/5/2016 |
29/4/2016 |
27/4/2016 |
03/05/16 |
30/4/2016 |
try using alt
=date(alt( Date#(DateField,'DD/MM/YYYY'),Date#(DateField,'DD/MM/YY')),'DD/MM/YYYY')
It did not work
I believe that this alone seems to be working:
SET DateFormat='DD/MM/YYYY';
Table:
LOAD Date(@1) as Date
FROM
[https://community.qlik.com/thread/217289]
(html, codepage is 1252, no labels, table is @1);
what is the format of you Date? As per your snapshot, I can see date format 'DD/MM/YYYY' and 'DD/MM/YY', so below should work
LOAD Date,
date(alt( Date#(DateField,'DD/MM/YYYY'),Date#(DateField,'DD/MM/YY')),'DD/MM/YYYY') as Date
....
FROM Source
Kush -
Have you looked at the sample I posted? We might not even need to use Alt() function here. Look at this discussion we had yesterday:Re: date format - includes a . and read marcowedel's response
What if the data is coming as string format from source(QVD or Excel)?
I have not tested this, but if you specify this -> SET DateFormat='DD/MM/YYYY'; at the top, QlikView should be able to read string as date as well (assuming that the string is either DD/MM/YYYY or DD/MM/YY)
issue was same. I was getting string instead of dates. Thanks for help