Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to concatenate year and month

HI friends,

could you help me on this.

4 Replies
MK_QSL
MVP
MVP

If you need output like YYYYMM use as below while creating calender.

Date(MonthStart(DateField),'YYYYMM') as YearMonth

If you want MonthYear i.e. MMYYYY use as below

Date(MonthStart(DateField),'MMYYYY') as YearMonth

If you want YYYY-MMM change accordingly..

vinieme12
Champion III
Champion III

if your Year and Month fields are separate then

Num(Year&Num(Month,'00')) as YearMonth 

this will give you values like 201601,201602 and so on

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
surendraj
Specialist
Specialist

If you have the day,month,year in seperate fields,you can concatinate by

date(makedate(year,month,day),'YYYY/MM') as year-month

Not applicable
Author

Hi ,

Thanks  for your posting,

i have been used the below date(floor(datefield),'mm-yy')  as as_yr_month

it is worked fine  fine  as per my requirnent.