fixed datetime to string error