Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I made a Cross Table through which I am getting multiple date fields along with other data. How can I convert it to one date field ?
Please find attached.
Thanks in advance
Regards
Umar
Provide data... You need to use something as below..
Load
Date(ALT(Date#(Date,'DD/MM/YYYY'),Date#(Date,'DD-MM-YYYY'),Date#(Date,'DD.MM.YYYY'),Date#(Date,'YYYYMMDD'))) as Date
Inline
[
Date
01/01/2014
01-02-2014
01.03.2014
20140401
];
Dear Umar,
Use Alias for converting multiple date fields into one date field.
Table 1:
Date1 as CalenderDate
Table 2:
Date2 as CalenderDate
Kind regards,
Ishfaque Ahmed
Hi,
Use alt Function as suggested by manish.
have a look at below post.
http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/25/which-conditional-functions-do-you-use
Regards
ASHFAQ
Use ALT function for this See the example from help
alt(case1[ , case2 , case3 , ...] , else)
The alt function returns the first of the parameters that has a valid number representation. If no such match is found, the last parameter will be returned. Any number of parameters can be used.
Example:
alt( date#( dat , 'YYYY/MM/DD' ),
date#( dat , 'MM/DD/YYYY' ),
date#( dat , 'MM/DD/YY' ),
'No valid date' )
Will test if the field date contains a date according to any of the three specified date formats. If so, it will return the original string and a valid number representation of a date. If no match is found, the text 'No valid date' will be returned (without any valid number representation).
please attach example.
I am not sure you are talking about different date formats.
Maybe it's just several columns in your table you would like to load using the cross table prefix.
regards
Marco
Hey guys, sorry
Here is the attachment
Can you provide the expected output you required in Excel Format pls?