Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Tags (2)
1 Solution

Accepted Solutions
nagaiank
Valued Contributor III

Re: Date in quarter

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

];

2 Replies

Re: Date in quarter

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


talk is cheap, supply exceeds demand
nagaiank
Valued Contributor III

Re: Date in quarter

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

];

Community Browser