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

Extracting Date from a String

Hi guys,I am new to Qlik Sense and I'm facing difficulties while trying to extract the date from the given string.can anyone help me with this?.I have posted some of the strings below from which the date should be extracted.

Sunday, January 01, 2012

Monday, January 02, 2012

Tuesday, January 03, 2012

Wednesday, January 04, 2012

1 Reply
Anismohamed32
Partner - Contributor III
Partner - Contributor III

Hi Nivetha,

welcome to qlik !!
i wish you should get some knowledge from qlik help regarding the date functionality

In this scenario , we have to tell the qlik sense that the given string is in right format of date

1. learn about Date # ()
2. Date ()

How to convert in to date format :
Type A - which can be done in front end
Backend :
load * inline [
String_date
Monday, January 02, 2012
Tuesday, January 03, 2012
Wednesday, January 04, 2012
];
After loading , open the chart section

Step 1: Create a variable in front end with the given the set below as Date1
right(trim(SubField('String_date',',',2)),2)&'/'&
left(trim(SubField('String_date',',',2)),3)&'/'&
trim(SubField('String_date',',',3))

step 2: Date(Date#($(Date1),'DD/MMM/YYYY'))