fix datecode bug