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: 
Not applicable

change Date Format

Hi Guys,

I Have these Kind of date formats

Row1   12/10/2014

Row2   12-10-2014

Row3   12/10/2014

Row4   12-10-2014

.         .

.

.

.

Rown    DD/MM/YYYY

I need to change all the dates into a single format like DD:MM:YYYY.Please help me

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try using this on your load:

date(alt(Date#(Data,'DD/MM/YYYY'),Date#(Data,'DD-MM-YYYY')),'DD:MM:YYYY') as Data

Regards,

Gabriel

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Try using this on your load:

date(alt(Date#(Data,'DD/MM/YYYY'),Date#(Data,'DD-MM-YYYY')),'DD:MM:YYYY') as Data

Regards,

Gabriel

maxgro
MVP
MVP

load

Rown,

date(date#(replace(b, '/', '-'), 'DD-MM-YYYY'), 'DD:MM:YYYY') as date;

load * inline [

Rown,b

Row1,   12/10/2014

Row2,   12-10-2014

Row3,   12/10/2014

Row4,   12-10-2014

];

Not applicable
Author

Thank you so much guys

Not applicable
Author

Hi Guys,

Suppose field 2 should contain numeric values

Row1   12102014

Row2   12102014

Row3   adxsdfe

Row4   12102014

.         .

.

.

.

Rown

During load I want to replace the text with 0's .please help me

maxgro
MVP
MVP

t:

load a, if(not IsNum(b), Repeat('0', len(b)) , b) as b;

load * inline [

a,          b

Row1,   12102014

Row2,   12102014

Row3,   adxsdfe

Row4,   12102014

];