Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
rkpatelqlikview
Creator III
Creator III

How to combine three fields in to one field from same table

Hi,

Hope you are doing great!

Can any one please explain how to combine multiple fields into one field?

Please find the attached excel example data.

from timestamp field i need only date and need to combine in to one field.

Thanks for advance.

16 Replies
pradosh_thakur
Master II
Master II

for this what need to be the output

11JJ2017-10-24 17:43:312017-10-25 19:26:37

in rowno 11 there are multiple dates which dates need to be there ? or you want both the dates ?

Learning never stops.
vangurideepu
Creator
Creator

Hi Kumar,

try like this, Using concatenate symbol

we can combine the fields

CapturedDate1&'|'&CapturedDate2&'|'&CampturedDate3 as FinalDate,




Regards

Pradeep

kenphamvn
Creator III
Creator III

Hi

Please give expected result for this data

1-18-2018 3-08-19 PM.png

Regards

An Pham

rkpatelqlikview
Creator III
Creator III
Author

Thanks for your response.

That fields all are Timestamps, from that i need only Date and need to combine the three fields in too one fields.

Like this,

23.10.2017

24.10.2017

25.10.2017

rkpatelqlikview
Creator III
Creator III
Author

Thanks Pradeep,

Can you please find below scripts.It's showing wrong.

please advice.

TRIP:

LOAD

Date1 &'|'& Date2 &'|'& Date3  as finalDate,

     [Carrier Name],

     [Carrier Code],

     DATE(DayStart([Stage1Captured Time], 'DD.MM.YYYY')) as Date1,

   

     DATE(DayStart([Stage2Captured Time], 'DD.MM.YYYY')) as Date2,

   

     DATE(DayStart([Stage3Captured Time], 'DD.MM.YYYY')) as Date3,

  

FROM

(...

(ooxml, embedded labels, table is [Trip Report]); 

rkpatelqlikview
Creator III
Creator III
Author

Thanks for your response Pham,

Its should be only one date. Excludes time.

FinalDate

23.10.2017

shanky1907
Creator II
Creator II

Try preceding load:

TRIP:

LOAD

Date1 &'|'& Date2 &'|'& Date3  as finalDate,

     [Carrier Name],

     [Carrier Code],

     DATE(DayStart([Stage1Captured Time], 'DD.MM.YYYY')) as Date1,

  

     DATE(DayStart([Stage2Captured Time], 'DD.MM.YYYY')) as Date2,

  

     DATE(DayStart([Stage3Captured Time], 'DD.MM.YYYY')) as Date3;

LOAD

       [Carrier Name],

     [Carrier Code],

     Stage1Captured Time,

     Stage2Captured Time,

     Stage3Captured Time

FROM

(...

(ooxml, embedded labels, table is [Trip Report]);

rkpatelqlikview
Creator III
Creator III
Author

Hi Shashank,

Its not working.

LOAD *,

Date1 &'|'& Date2 &'|'& Date3  as finalDate;

LOAD *,

     DATE(DayStart([Stage1Captured Time], 'DD.MM.YYYY')) as Date1,

 

     DATE(DayStart([Stage2Captured Time], 'DD.MM.YYYY')) as Date2,

 

     DATE(DayStart([Stage3Captured Time], 'DD.MM.YYYY')) as Date3;

LOAD

       [Carrier Name],

     [Carrier Code],

     Stage1Captured Time,

     Stage2Captured Time,

     Stage3Captured Time

FROM

(...

(ooxml, embedded labels, table is [Trip Report]);

shanky1907
Creator II
Creator II

What is the error?