Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
amithmurali
Partner - Creator II
Partner - Creator II

Join Month and Year into Single Field Date

Hi guys,

I have a Problem now. i have stocks table in which they give month and year in different fields. i want to join them into a single field. as described below.

MonthYear
22015
32015
4

2015

52015

I have month and year in two different fields in my table.

i want to join them into a single field . like this,

Date

28-02-2015
31-03-2015
30-04-2015
31-04-2015

*The date should be end of the Month.

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

You're right I made a mistake,

try this

MonthEnd(MakeDate(Year, Month , 1)) as myDate

View solution in original post

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try with:

monthend ( Year & '/' & Month & '/' & '01' )

let me know

amithmurali
Partner - Creator II
Partner - Creator II
Author

can you please explain me how to write the script. Sorry i am newbie here.

alexandros17
Partner - Champion III
Partner - Champion III

Probably you are loading data with a sql query, something like

SELECT

....

From

....

Where

...

Then, add to your list of fields a new one in this way:

SELECT

....

Year,

Month,

monthend ( Year & '/' & Month & '/' & '01' ) as myDate

From

....

Where

...

Let me know

vishsaggi
Champion III
Champion III

Hello Amith,

As Alessandro mentioned using that script as a separate field for date. Like below

Load Month,

        Year,

        Monthend(Year & '/' & Month & '/' & '01') As Date

FROM <Your Table Name> ;

Thanks,

V.

amithmurali
Partner - Creator II
Partner - Creator II
Author

i tried this and the date field is empty. 1.jpg

vishsaggi
Champion III
Champion III

Try using date function and check. Like

Date(Monthend(Year & '/' & Month & '/' & '01'), 'DD-MM-YYYY') As Date

V.

alexandros17
Partner - Champion III
Partner - Champion III

You're right I made a mistake,

try this

MonthEnd(MakeDate(Year, Month , 1)) as myDate

amithmurali
Partner - Creator II
Partner - Creator II
Author

Thanks. it worked.

amithmurali
Partner - Creator II
Partner - Creator II
Author

ur ri8