Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Nari999
Partner
Partner

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

View solution in original post