Is it possible to use a function like DATEADD() or DATEPART() on a varchar column that may or may not hold something that looks like a datetime?
Currently I'm trying this by using a WHERE clause to select only rows that have datetime values in this column and getting the usual arithmetic overflow error.
I could perform some sort of operation to extract just the datetime values and put them in a temp table but I'm curious about this.
Example
SELECT DATEPART(wk, DateCreated) FROM tblOrders WHERE colType = 'datetime'
Don't worry about the table design, it's not as bad as that.