SQL Server 2012
How can I convert a varchar value into a date field if the data comes across in the following formats:
Mar-01-2016 3:20:00 AM
Mar-01-2016
NULL
'' (this means blank)
I have tried numerous cast/convert combinations but keep getting a conversion error. I have tried left 11 characters, then replaced the = with / with no luck. Please help!
TJ
How can I convert a varchar value into a date field if the data comes across in the following formats:
Mar-01-2016 3:20:00 AM
Mar-01-2016
NULL
'' (this means blank)
I have tried numerous cast/convert combinations but keep getting a conversion error. I have tried left 11 characters, then replaced the = with / with no luck. Please help!
TJ