fix bug for nil data of datetime