if isnull(select_stats.MATURITY_DATE) then setnull() else if IsValid("Date" , select_stats.MATURITY_DATE, "%yyyy%mm%dd") Then StringToDate(select_stats.MATURITY_DATE,"%yyyy%mm%dd") else setnull()
if isnull(select_stats.MATURITY_DATE) then setnull() else if IsValid("Date" , select_stats.MATURITY_DATE, "%mm%dd%yyyy") Then StringToDate(select_stats.MATURITY_DATE,"%mm%dd%yyyy") else setnull()
if isnull(select_stats.MATURITY_DATE) or select_stats.MATURITY_DATE=0 then setnull() else if (IsValidDate(StringToDate(select_stats.MATURITY_DATE,"%mm%dd%yyyy"))=1) then StringToDate(select_stats.MATURITY_DATE,'%mm%dd%yyyy') else '0001-01-01'
This function populate only '0001-01-01' not the dates .
Can someone help me on the exact code which give me valid dates in ouput.
if isnull(select_stats.RENEWAL_DATE) then setnull() else if IsValid('Date' ,StringToDate(select_stats.RENEWAL_DATE, "%mm%dd%yyyy")) Then StringToDate(select_stats.RENEWAL_DATE,"%yyyy%mm%dd") else setnull()
We seem to be missing some vital piece of information or this would have been solved some time ago seeing as how you've tried about every combination under the sun. What exactly is your source and how you are bringing it into the job? Are you certain that the format you posted as an example is accurate and the values are coming into the job properly?
If you haven't done so already, throw in a Peek stage before you attempt the conversion as a sanity check.
-craig
"You can never have too many knives" -- Logan Nine Fingers