Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

date 11 jan 2011

in my date field 11 jan 2011

how to retrive the month ,date year

5 Replies
MVP
MVP

Re: date 11 jan 2011

Date(Date#(YourField, 'DD MMM YYYY')) as Date

Month(Date#(YourField, 'DD MMM YYYY')) as Month

Year(Date#(YourField, 'DD MMM YYYY')) as Year

satyadev_j
Valued Contributor

Re: date 11 jan 2011

Hi,

Try below,

Date(Date#('11 jan 2011', 'DD MMM YYYY')) as Date,

Day(Date#('11 jan 2011', 'DD MMM YYYY')) as Day,

Month(Date#('11 jan 2011', 'DD MMM YYYY')) as Month,

Year(Date#('11 jan 2011', 'DD MMM YYYY')) as Year

Not applicable

Re: date 11 jan 2011

these are not working

Re: date 11 jan 2011

Try like below scripts what is your date format.

Date(Date#(YourDateField, 'DD MMM YYYY'),'DD/MM/YYYY') as Date

Or

//For Date use below scripts

MakeDate(Year(Date#(Right('11 jan 2011',4),'YYYY')), Month(Date#(mid(Da,4,3),'MMM')),Day(Date#(Left('11 jan 2011',2),'DD'))) as DateField

Month(Date#(YourDateField, 'DD MMM YYYY')) as Month

Or

Month(Date#(mid('11 jan 2011',4,3),'MMM'))

Year(Date#(YourField, 'DD MMM YYYY')) as Year

Or

Year(Date#(Right('11 jan 2011',4),'YYYY'))

Re: date 11 jan 2011

Try simply these

Month(YourField) as Month

Year(YourField) as Year

Let me know

Community Browser