fix format error in datetime