Hi there,
I have an import job with these two conditionals in a group:
todate less than @Code(new System.DateTime(1900, 2, 2).ToString("yyyy/MM/dd", System.Globalization.CultureInfo.InvariantCulture))
todate greater than @Code(System.DateTime.Now)
When I turn on "Remove missing rows after import in the destination tables only" my job fails with the following message: "Conversion failed when converting date and/or time from character string" which is caused by an incorrect date format. I can see the following where clause in the error:
AND ([todate] < '02-02-1900 00:00:00' Or [todate] > '15-06-2026 11:51:56' )
SQL trips over the 15-06 and wants it to be 06/15.
How do I format this properly? I tried setting the job's culture to US English, but I get the same result.
Imar