Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
How to get a Long Month Name (January,February .....) and week (Week1,Week2.......) from a date field
suppose my i got data like
Thanks...
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.
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
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);
HI Nagaraj,
i tried ur code and i am getting this
i just want only one of each value .....
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.
It worked ...thanks
what really dual is doing over here
Dual(Date(Date,'MMMM') ,Month(Date(Date,'MMM'))) as Month,
Great. Below link might be helpful to understand the dual function better.