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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hi

i have a date column and want to extract quarter information from this. The date is is the YYYYMMDD format.

thanks

Labels (1)
12 Replies
Not applicable
Author

Hey thank you so much. Its working fine.. ☺

hannan_t
Partner - Contributor III
Partner - Contributor III

Try this:

date(makedate(left(Date_Field,4),mid(Date_Field,5,2),Right(Date_Field,2)),'DD-MM-YYYY')

It will convert YYYYMMDD into DD-MM-YYYY and after that try applying ceil function.

tresB
Champion III
Champion III

Try like:

Load     *,

              'Q' & Ceil(fMonth/3) as Quarter;

Load

          Mod(Month(Date#(YourDateField, 'YYYYMMDD')) -11, 12)+1        as fMonth,

           Month(Date#(YourDateField, 'YYYYMMDD')) as Month

From <>;

Here if you select Nov from Month field, it will associate '1' in the fMonth field.