I'm pulling data out of a CRM into a reporting system.
Unfortunately the developers of CRM thought it a good idea to store a date
as a string
, and then not put validation on the field.
I'm trying to do this MAX(Convert(datetime,Action.DateOfAction, 102))
; however, because there is some invalid data I am getting an out of range error.
How do I work around this? I can't just fix the data as clearly we are still going to get some invalid data entered by users occasionally, and I can't fix the application because I don't have the source.
Thanks
Ian