Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Load script make of two fields one


Hello together,

i Need your help. I have two fields mont and year. How I get this two fields in one field with load script?

Thanks

Jörn

1 Solution

Accepted Solutions
MVP
MVP

Re: Load script make of two fields one

Try like:

Load

          MakeDate(YearField, MonthField) as Date  // This will work if month is numerical

          Date(Date#(YearField&MonthField&'1', 'YYYYMMMD')) as Date  // If month is like - jan. feb...

5 Replies
MVP
MVP

Re: Load script make of two fields one

Try like:

Load

          MakeDate(YearField, MonthField) as Date  // This will work if month is numerical

          Date(Date#(YearField&MonthField&'1', 'YYYYMMMD')) as Date  // If month is like - jan. feb...

Re: Load script make of two fields one


Hi,

Try this,

Month &'-'& Year as New_Month_Year

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.

Re: Load script make of two fields one

Hi,

try below

Load

Day,

Month,

Year,

Date,

Month&'-'&Year as MonthYear

from test.qvd;

Regards

ASHFAQ

hannan_t
New Contributor III

Re: Load script make of two fields one

Try this in your script :

MonthField&'-'&YearField as MonthYear

Result will be something like this:

Aug-2014

Re: Load script make of two fields one

Hi

Its based on your requirement.

MakeDate(YearField, MonthField, 01) as Date  Gives FirstDayofMonth respective year.

YearField&'-'&MonthField as YearMonth  Gives ex: 2014-08 or 2014-Aug

MonthField&'-'&YearField as  MonthYear Gives ex: 08-2014 or Aug-2014

Hope it helps

Community Browser