Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

One MOnth out of two date

Hi Expertise,

I have come across a 2 scenarion where i need to get month  filed out of two dates . 

1. Register Date and Update Date  Here i should how can i achive this during load script ? my both dates formats are as below . 

 2. I have string  something like this  "IN drew care203 ///_BED the23 "  and i need to show only BED from this .

smilingjohn_0-1604934263352.png

Thanks IN Advance 

1 Solution

Accepted Solutions
QFabian
Specialist III
Specialist III

something like this ?

Load
if(monthname([Register Date]) = monthname([Update Date]), month([Update Date])) as [Month],
if(findoneof(yourraretext, 'BED')>0, 'BED') as [yourextractedtext]
from your source;

QFabian

View solution in original post

3 Replies
QFabian
Specialist III
Specialist III

Hi, try something like this :

 

Load
month([Register Date]) as [Register Month],
month([Update Date]) as [Update Month],
subfield(subfield(yourraretext, '///_', 2), ' ', 1) as [yourextractedtext]
from your source;

QFabian
smilingjohn
Specialist
Specialist
Author

@QFabian  I dont want seprate Months, I want to have one month from both the dates . considering equal dates . 

And also the Subfield dosnot work for me ,becuase BED can even come in the first middle or last .

Thanks 

QFabian
Specialist III
Specialist III

something like this ?

Load
if(monthname([Register Date]) = monthname([Update Date]), month([Update Date])) as [Month],
if(findoneof(yourraretext, 'BED')>0, 'BED') as [yourextractedtext]
from your source;

QFabian