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: 
Nari999
Partner - Contributor II
Partner - Contributor II

Divide two dates from one date field

Hi  All,

I have Date Field in that field having values like '1.10.2019 to 13.10.2019'

                                                                                                 ' 14.10.2019 to 28.10.2019'

i want to divide this values into two fields,

                                                                                 From_Date field:                                 To_Date:

                                                                                     '1.10.2019'                                         '14.10.2019'

                                                                                     ' 14.10.2019'                                    ' 28.10.2019'

How can i do?

Thanks,

1 Solution

Accepted Solutions
Ezir
Creator II
Creator II

Hi @Nari999,

 

You can use the Subfield function like this:

 

origin:
load * inline [
dates;
'1.10.2019 to 13.10.2019';
'14.10.2019 to 28.10.2019';
] (delimiter is ';');

result:
load SubField(dates,'to',1) as From_Date,
SubField(dates,'to',-1) as To_Date
resident origin;

 

 

Result

result_dates.png

Regards,

 

Ezir

View solution in original post

1 Reply
Ezir
Creator II
Creator II

Hi @Nari999,

 

You can use the Subfield function like this:

 

origin:
load * inline [
dates;
'1.10.2019 to 13.10.2019';
'14.10.2019 to 28.10.2019';
] (delimiter is ';');

result:
load SubField(dates,'to',1) as From_Date,
SubField(dates,'to',-1) as To_Date
resident origin;

 

 

Result

result_dates.png

Regards,

 

Ezir