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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get Year month

Hi Guys,

I have a problem to get YEAR, MONTH, DATE from the fields given below, Can any one help me to solve the problem.

Here is the Script.

Times:

SQL SELECT

"CALENDAR_MONTH_DESC",

"CALENDAR_MONTH_ID",

"CALENDAR_MONTH_NAME",

"CALENDAR_MONTH_NUMBER",

"CALENDAR_QUARTER_DESC",

"CALENDAR_QUARTER_ID",

"CALENDAR_QUARTER_NUMBER",

"CALENDAR_WEEK_NUMBER",

"CALENDAR_YEAR",

"CALENDAR_YEAR_ID",

"DAY_NAME",

"DAY_NUMBER_IN_MONTH",

"DAY_NUMBER_IN_WEEK",

"DAYS_IN_CAL_MONTH",

"DAYS_IN_CAL_QUARTER",

"DAYS_IN_CAL_YEAR",

"DAYS_IN_FIS_MONTH",

"DAYS_IN_FIS_QUARTER",

"DAYS_IN_FIS_YEAR",

"END_OF_CAL_MONTH",

"END_OF_CAL_QUARTER",

"END_OF_CAL_YEAR",

"END_OF_FIS_MONTH",

"END_OF_FIS_QUARTER",

"END_OF_FIS_YEAR",

"FISCAL_MONTH_DESC",

"FISCAL_MONTH_ID",

"FISCAL_MONTH_NAME",

"FISCAL_MONTH_NUMBER",

"FISCAL_QUARTER_DESC",

"FISCAL_QUARTER_ID",

"FISCAL_QUARTER_NUMBER",

"FISCAL_WEEK_NUMBER",

"FISCAL_YEAR",

"FISCAL_YEAR_ID",

"TIME_ID",

"WEEK_ENDING_DAY",

"WEEK_ENDING_DAY_ID"

FROM SH.TIMES;

from which field can I get YEAR, MONTH DAY and QUARTER..

Thanks,

Khalid

1 Solution

Accepted Solutions
prabhu0505
Specialist
Specialist

Go through this example http://community.qlik.com/media/p/113268.aspx for information on date related operations

View solution in original post

5 Replies
Not applicable
Author

Dear Khalid,

Its diff to answer with having a look of data and type of data Source.

I guess Calendar_year , MOnth-Name and Quarter_desc will help u .

Regards

Ashwin

prabhu0505
Specialist
Specialist

Go through this example http://community.qlik.com/media/p/113268.aspx for information on date related operations

Not applicable
Author

Dear Khalid,

I know there are specific functions in QV for Year, Month and Quarter but I'd suggest creating a temp calendar first to get all dates, then select from the temp calendar.

Hope that helps,

Barney

Not applicable
Author

Thanks it helped.

Not applicable
Author

Thanks a lot for the example, its very useful,

Thanks again.