Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Monthstart from year and month

Hi,

How to create month start from year and Month?

15 Replies
swuehl
MVP
MVP

Makedate( YEARFIELD, MONTHFIELD)

abhaysingh
Specialist II
Specialist II
Author

Already Tried not working

Colin-Albert

Use the makedate functions

    makedate(year, month)

e.g.   makedate(2016, 2)

without the day parameter makedate will return the first of the month.

swuehl
MVP
MVP

What do you mean with 'not working'? How does your field values for YEAR and MONTH look like?

Not applicable

Hi Abhay,

=makedate(2016)

              

          Output :   01-01-2016

=Makedate(2016,5)

    

          Output  01-05-2016

MayilVahanan

HI

May be try like this, if your month is in text

LOAD *, MakeDate(Year, MonthNum) as Date;

Load *,  Month(Date(Date#(Month,'MMM'),'MMM')) as MonthNum Inline

[

Year, Month

2015, Apr

2015, Jan

2015, Mar

];

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

Hi All,

i have year 2016, and month like jan,feb etc.

m tried before posting this monthstart(year,month)

PradeepReddy
Specialist II
Specialist II

try like this...

=makedate(2016,month(date#('Mar','MMM')))

sunny_talwar

What if we do it all in one step Mayil?

May be something like this:

Load *,

        MakeDate(Year, Month(Date#(Capitalize(Month), 'MMM'))) as Date 

Inline

[

Year, Month

2015, Apr

2015, Jan

2015, Mar

];