Optimise date time error handling