Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

month and week from date

HI,

How to get a Long Month Name (January,February .....) and week (Week1,Week2.......)  from a date field

suppose my i got data like

        Untitled.png

Thanks...

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Naveen,

Try this,

Load*,

Dual(Date(Date,'MMMM') ,Month(Date)) as Month,

'Week' & Week(Date) as Week;

LOAD Date#( Date,'DD/MM/YYYY') as Date,

          quantity

FROM

(ooxml, embedded labels, table is Sheet1);

Note: Updated the second parameter in the dual function.

View solution in original post

6 Replies
kunkumnaveen
Specialist
Specialist
Author

i Tried this :

q1:

LOAD date#(Date,'DD/MM/YYYY') as Date,

     quantity

FROM

(ooxml, embedded labels, table is Sheet1);

LOAD *,

month(date(Date,'MMMM')) as month,

//Month(Date#(Date,'DD/MMMM/YYYY')) as month,

//Month(Date(date#(Date,'DD/MM/YYYY'),'DD/MMMM/YYYY')) as month,

'Week'&Week(Date) as week

Resident q1;

DROP Table q1;

i couldn't get able to get Long Month Name

tamilarasu
Champion
Champion

Hi Naveen,

Try,

q1:

Load *,

Date(Date,'MMMM') as Month,

'Week'&Week(Date) as Week;

LOAD Date#( Date,'DD/MM/YYYY') as Date,

          quantity

FROM

(ooxml, embedded labels, table is Sheet1);

kunkumnaveen
Specialist
Specialist
Author

HI Nagaraj,

i tried ur code and i am getting this

Untitled.png

i just want only one of each value .....

tamilarasu
Champion
Champion

Naveen,

Try this,

Load*,

Dual(Date(Date,'MMMM') ,Month(Date)) as Month,

'Week' & Week(Date) as Week;

LOAD Date#( Date,'DD/MM/YYYY') as Date,

          quantity

FROM

(ooxml, embedded labels, table is Sheet1);

Note: Updated the second parameter in the dual function.

View solution in original post

kunkumnaveen
Specialist
Specialist
Author

It worked ...thanks

what really  dual is doing over here

Dual(Date(Date,'MMMM') ,Month(Date(Date,'MMM'))) as Month,

tamilarasu
Champion
Champion

Great. Below link might be helpful to understand the dual function better.

How to use- Dual()