Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create the month by using week and monthyear

can anyone help me in creating month by using week

and also monthyear by using month and year for exp 201301

8 Replies
Not applicable
Author

you can do MonthYear by MakeDate(Year,Month) but you cannot create out of month since 1 week can belong to 2 months

srinivasa1
Creator II
Creator II

Try MonthName And Year function EG

MontName(Week)

Year(week)

Not applicable
Author

my bad for monthyear by using month and year for exp 201301 use  Date(MakeDate(Year,Month),'YYYYMM')

Not applicable
Author

month(makedate(left('YearWeek',4)) + right('YearWeek',2)*7 -1) as Mon,

I am using this but can not see any values

before that I am creationg yearweek by using

YEAR & '-' & WEEK as YearWeek, 

it is working

rustyfishbones
Master II
Master II

Hi You can try

Year(Date) & Month(Date) AS YearMonth , the result would be 2013Jan

    or try

Year(Date) & '/' & Month(Date) AS YearMonth. the result would be 2013/Jan

   or try this to make it look a little better

Year(Date) & ' / ' & Month(Date) AS YearMonth. the result would be 2013 / Jan

Not applicable
Author

can i use the same thisng to get Month and week

Date(MakeDate(Year,Week),'YYYYWW')

Not applicable
Author

Hi,

It's not possible create a month from a week, because a week could be in two months.

For a MonthYear, you can use Date(MakeDate(Year, Month), 'YYYY-MMM')

Regards,

Ricardo

MayilVahanan

HI

Try like this

= MakeWeekDate(Year,Week)

Edit:

= MonthName(MakeWeekDate(Year,Week)) for month year

or

= Month(MakeWeekDate(Year,Week)) for month

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.