Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sujit_nath
Creator III
Creator III

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

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

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
Chanty4u
MVP
MVP

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

olivierrobin
Specialist III
Specialist III

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 ?

sujit_nath
Creator III
Creator III
Author

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