Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Author

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

Anonymous
Not applicable
Author

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
Creator III
Creator III

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

Regards,

som