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

Urgent help

Dear All

I need suggestions over below field, where i have to split EMPIDDATE field on the basis of EMP ID & DATE

EMPIDDATE

1[01$022&014]

2[11$042&014]

3[14$022&014]

4[04$012&014]

5[05$092&014]

Needed O/P:

EMPID    DATE

1          01 -02-2014

2          11-04-2014

and So on..

Thanks in Advance

Timba

9 Replies
Gysbert_Wassenaar

LOAD

     subfield(EMPIDDATE,'[',1) as EMPID,

     date(date#(purgechar(textbetween(EMPIDDATE,'[',']'),'&') ,'DD$MMYYYY'),'DD-MM-YYYY') as DATE

FROM ....


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

Load

          SubField(EMPIDDATE, '[',1) as EMPID,

          Date(date#(SubField('1[01$022&014]', '[',2), 'DD$MMY&YYY]')) as DATE

From <>;

Not applicable
Author

HI, use

following expression in script in in list box,

left(purgechar(EMPIDDATE,'[]$&'),1) as EMDID,

Makedate(right(purgechar(EMPIDDATE,'[]$&'),4),mid(purgechar(EMPIDDATE,'[]$&'),4,2),mid(purgechar(EMPIDDATE,'[]$&'),2,2)) as Date

Gysbert_Wassenaar

Your date is off by 2000 years


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

Thanks for the correction.

Corrected one:

Date(date#(Replace(SubField('1[01$022&014]', '[',2),'&',''), 'DD$MMYYYY]')) as DATE

er_mohit
Master II
Master II

See the attached file

ashfaq_haseeb
Champion III
Champion III

Hi,

try below

Directory;

LOAD EMPIDDATE,

Left(EMPIDDATE, Index(EMPIDDATE, '[') - 1) as EMPID,

Date(date#(right(KeepChar(EMPIDDATE,'0123456789'),8),'DDMMYYYY')) as Date

FROM

[..\Desktop\Book1.xlsx]

(ooxml, embedded labels, table is Sheet1);

Regards

ASHFAQ

Not applicable
Author

Dear All thanks , its working.

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you close this thread by selecting appropriate answer.

Regards

ASHFAQ