Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

amithmurali
Contributor

Qlikview not recognising Date

Hi guys,

I have a table with the date format like this,

Period_id
201501
201502
201503
201504
201505

How can i make qlikview understand this type of format.

Its giving me no values when i try Year(Period_id).

1 Solution

Accepted Solutions
amithmurali
Contributor

Re: Qlikview not recognising Date

Thanks , it worked. i used it like this.

MonthEnd(Date#(PERIOD_ID,'YYYYMM')) as KPIDate,

6 Replies
maleksafa
Valued Contributor

Re: Qlikview not recognising Date

try this one

=year(date(date#('201501','YYYYMM'),'MMM-YYYY'))

qlikmsg4u
Valued Contributor

Re: Qlikview not recognising Date

Hi Amith,

Try like this

=Year(Date#(Period_id,'YYYYMM'))

Re: Qlikview not recognising Date

=makedate(left('201501',4),right('201501',2),1)

amithmurali
Contributor

Re: Qlikview not recognising Date

Thanks , it worked. i used it like this.

MonthEnd(Date#(PERIOD_ID,'YYYYMM')) as KPIDate,

qlikmsg4u
Valued Contributor

Re: Qlikview not recognising Date

Amith Try this

=MonthEnd(Date(Date#(PERIOD_ID,'YYYYMM')))

MVP
MVP

Re: Qlikview not recognising Date

Load the date fields like this:

LOAD Period_id,

  Date#(Period_id, 'YYYYMM') As Period,

  Year(Date#(Period_id, 'YYYYMM')) As Year,

  ...

Now you can use Period as a normal date field and Year as the year field.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Community Browser