f=@(x)upper(datestr(datenum(x,'yyyymm'),12));

f('201604')
f('200001')
f('000112')
f('123405')