Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date in quarter

Hello,

Actually, I need to tranform a string into date for example:

2012_Q1

2012_Q2

2013_Q1

2013_Q2

Until now I only isolated 2012_Q"2" and try to make appear every informations that quarter can show but that way didn't work. Then, do you have a idea to make this string in data?

Regards

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

The following script gives

Capture.PNG

Data:

LOAD *,

Date(MakeDate(Left(YYYY_QN,4),(Right(YYYY_QN,1)-1)*3+1,1)) as QStart;

LOAD * Inline [

YYYY_QN

2012_Q1

2012_Q2

2013_Q1

2013_Q2

];

View solution in original post

2 Replies
Gysbert_Wassenaar

Perhaps like this: makedate(left(YearQuarter,4),right(YearQuarter,1)*3-2)


talk is cheap, supply exceeds demand
nagaiank
Specialist III
Specialist III

The following script gives

Capture.PNG

Data:

LOAD *,

Date(MakeDate(Left(YYYY_QN,4),(Right(YYYY_QN,1)-1)*3+1,1)) as QStart;

LOAD * Inline [

YYYY_QN

2012_Q1

2012_Q2

2013_Q1

2013_Q2

];