Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

adoteykwame
Contributor

YEAR and MID function together

Hello,

YEAR(MID(policy,13,2)),'YYYY' as [POLICY YEAR],

where Policy= DDCETHDGTEF1130034

I want the resultant to be 2013 and not 13

3 Replies
Not applicable

Re: YEAR and MID function together

Hi,

I'm not sure you can do that.

And, if you use a trick like this:

'20' & MID(policy,13,2) as [POLICY YEAR],

?

Hope it help

Regards

Giampiero

adoteykwame
Contributor

Re: YEAR and MID function together

Hi Giampiero,

Yeah i thought so but your repsonse wouldnot work perfectly because most of the year are in 1900's and not only in 2000's

Thanks though.

somenathroy
Contributor III

Re: YEAR and MID function together

So there must be some logic to find out which Policies fall under which centenary.

Regards,

som

Community Browser