Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

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

Tags (2)
1 Solution

Accepted Solutions
gabriel_kirst
Contributor III

Re: change Date Format

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

5 Replies
gabriel_kirst
Contributor III

Re: change Date Format

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

MVP
MVP

Re: change Date Format

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

Re: change Date Format

Thank you so much guys

Not applicable

Re: change Date Format

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

MVP
MVP

Re: change Date Format

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

];

Community Browser