change the code on date type