Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
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

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

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

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

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

How to use- Dual()