fixed bug in func num2date