Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
umartareen
Creator II
Creator II

Multiple Date Fields

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

8 Replies
MK_QSL
MVP
MVP

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

];

engishfaque
Specialist III
Specialist III

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

ashfaq_haseeb
Champion III
Champion III

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

its_anandrjs

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).

MarcoWedel

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

ashfaq_haseeb
Champion III
Champion III

Marco Wedel Attachment missing.

Regards

ASHFAQ

umartareen
Creator II
Creator II
Author

Hey guys, sorry

Here is the attachment

MK_QSL
MVP
MVP

Can you provide the expected output you required in Excel Format pls?