Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert date to quarterly variant

Hello,

I need some help converting regular date values (MM/DD/YYYY) into a quaterly equivalent, such that for any date in columnA, a new date in columnB is generated whose month can only be 3,6,9,or 12. This needs to be done in the load script

For example:

columnAcolumnB
1/13/20163/1/2016
5/29/20166/1/2016
11/30/201712/1/2017
12/31/201712/1/2017
9/18/20189/1/2018

Any advice is greatly appreciated!

Regards,

Kyle Platte

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Like this..

LOAD columnA,

     MonthStart(QuarterEnd(columnA)) as columnA1,

     columnB

    

FROM

[https://community.qlik.com/thread/268948]

(html, codepage is 1252, embedded labels, table is @1);

Capture.JPG

View solution in original post

3 Replies
sunny_talwar

Do you want to go to next quarter or stay in the current one for columnB?

Try on of these

QuarterStart(columnA) as columnB1

QuarterStart(columnA, 1) as columnB2

settu_periasamy
Master III
Master III

Like this..

LOAD columnA,

     MonthStart(QuarterEnd(columnA)) as columnA1,

     columnB

    

FROM

[https://community.qlik.com/thread/268948]

(html, codepage is 1252, embedded labels, table is @1);

Capture.JPG

Not applicable
Author

Thanks, Settu!

Exactly what I needed.

Regards,

Kyle