... giving up with a "Data Conversion" task. I then parse the date, month and year out using SUBSTRING:
-- Assuming [This_Date]="21/03/2012"
(DT_DATE)(This_Date)
-- Assuming [This_Date]="20120321" ...
... part of this, ie "String4". So I need to delimit based on the dot/period (.) and use substring in a sort of reversed form.
For argument's sake, I'm assigning this string to the variable "haystack".
...
... if Given Value is date (ISDATE does not recognize CAST AS DATE)
IF @OrigLen=10
AND (LEN(@OrigVal) - LEN(REPLACE(@OrigVal, '-', '')))=2
AND ISNUMERIC(SUBSTRING(@OrigVal, ...
... SET SQLStatement = 'SELECT * INTO SearchTMP FROM ' + Tablename + ' WHERE ' + substring(WHEREClause,1,len(WHEREClause)-5)
DELETE FROM @SQLTbl
WHERE WHEREClause IS NULL
...
... Given Value is date (ISDATE does not recognize CAST AS DATE)
IF @OrigLen=10
AND (LEN(@OrigVal) - LEN(REPLACE(@OrigVal, '-', '')))=2
AND ISNUMERIC(SUBSTRING(@OrigVal, ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.