Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Different formats of date in a column

I have a table with date values in a feild, but with different formats.. ex: ddmmyyyy,ddmmyy,mmddyyyy,yyyyddmm etc.

How do I load then in a different table in a same format. (dd/mm/yyyy)

my data would be like:

Table:

Load * inline [

Date

11122017

01112016

090816

11022016

20172105

20162204

];

In the other table, I need the dates as: 11/12/2017 etc..

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Champion III
Champion III

Re: Different formats of date in a column

try with alt function 

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ConditionalFun...

alt( date#( dat , 'YYYY/MM/DD' ),

date#( dat , 'MM/DD/YYYY' ),

date#( dat , 'MM/DD/YY' ),

'No valid date' )

View solution in original post

3 Replies
Highlighted
Champion III
Champion III

Re: Different formats of date in a column

try with alt function 

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ConditionalFun...

alt( date#( dat , 'YYYY/MM/DD' ),

date#( dat , 'MM/DD/YYYY' ),

date#( dat , 'MM/DD/YY' ),

'No valid date' )

View solution in original post

Highlighted
Specialist III
Specialist III

Re: Different formats of date in a column

hello

whatever solution you take, you will have another problem :

let's take 11122017 : how do you know it should be interepreted as a DDMMYYYY oy MMDDYYYY date ?

Highlighted
Creator II
Creator II

Re: Different formats of date in a column

That's an issue.. but ya.. alt function should help me