Fixing datetime_to_string