Friday, March 23, 2012

replace out of range dates

Hi,

I'm migrating data from access 2003 to sql server 2005. An access table contains dates like 5/1/0999. This is a date that is out of the datetime range from sql server.

Now my question is ... How do I replace these dates? I don't find something like IsDate in the expressions?

Ok

I did it with a Derived Column task.
It replaces the date column values who have out of range dates. (It only checks for dates smaller then 1/1/1753)

The expression is like this: [DateToCheck] < (DT_DATE)"1753-1-1" ? (DT_DATE)"1753-1-1" : [DateToCheck]

No comments:

Post a Comment