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

Month

Hi Experts,

I have in  date in Excel like

STARTDATE  ENDDATE

27/03/2016      31/05/2016

I need output like

1 Solution

Accepted Solutions
maniram23
Creator II
Creator II

Hi,

T1:

LOAD

date(start_date,'YYYY_MMM') as start_date,

date(End_date,'YYYY_MMM')  as End_date,

     company_name   

FROM

[........xlsx]

(ooxml, embedded labels, table is Sheet1);

LOAD Addmonths(start_date,iterno()-1) as start_date,

company_name

Resident T1

WHILE AddMonths(start_date,iterno()-1) <= End_date;

DROP Table T1;

View solution in original post

39 Replies
qlikview979
Specialist
Specialist
Author

Output like this

2016_mar

2016_apr

2016_may

PrashantSangle

Hi,

using those 2 field you want create one field????

     > use master calendar

For that formating

     > use date(dateField,'YYYY_MMM')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable

Why not check this?

The Date Function

yadav_anil782
Creator II
Creator II

PLZ TRY THIS

LOAD

date,

date(date,'YYYY-MMM') AS Date

FROM

(qvd);

muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

Can you send me a sample QVW file?

Muthukumar Pandiyan
qlikview979
Specialist
Specialist
Author

Hi Anil,

Please check my source& output . I don't have April Month in source ,but i want April month also.

Regards,

Mahesh.

qlikview979
Specialist
Specialist
Author

Hi

please find the attached file

jonathandienst
Partner - Champion III
Partner - Champion III

Load like this:

LOAD

  Date(MonthStart(STARTDATE), 'yyyy-MMM') as STARTDATE,

  Date(MonthStart(ENDDATE), 'yyyy-MMM') as ENDDATE,

  ...

I would use MonthStart or MonthEnd to ensure a unique value for each month. Otherwise you could land up with multiple dates formatted as (for example) "2016-Jun", so they look the same, but have different underlying values (1 Jun, 2 Jun etc).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qlikview979
Specialist
Specialist
Author

Hi Jonathan,

Please check my above attached Qvw.

Regards,

Mahesh.