User 2568 | 4/30/2016, 11:42:25 PM
I'm using strtodatetime to convert a column in a very large sf from string to datetime. WHen I use it I got the error message
RuntimeError: Runtime Exception. Unable to interpret as string with %Y-%m-%d format
Due to the formatting, it was not clear to me that the error message included the string it was trying to convert. Perhaps putting the offending string in quotes would have helped, i.e., .
RuntimeError: Runtime Exception. Unable to interpret '' as string with %Y-%m-%d format
Furthermore, I think it would be handy to provide a option for dealing with errors, as is done with some other routines. I'm thinking some thing like
missing_value_action : [str, datetime.datetime], optional Action to perform when string does not fit the pattern. Can be one of: 'datetime': Fill using this datetime object ‘impute’: Fill in with the mean of the preceding and following dates [useful for time series like data]. ‘error’: Do not proceed with evaluation and terminate with an error message.