I am working on a project with our HR department that counts the number of Temps that have been hired over a specific time.
I am importing data from an Excel Spreadsheet that is being supplied from our SAP system in a monthly automated Export. The [TempHireDate] column has 00/00/0000 instead of a NULL in the Cells that a date was not required. I want to run a derived column that strips out the 00/00/0000 and replaces it with a NULL value as I import it to the table.
I believe a derived column is the answer but i am having difficulty getting any of the standard expressions to work. I thought the REPLACE expression would work but I don't think I am doing it right.
REPLACE(00/00/0000,[TempHireDate],NULL)
I did a search and found some other examples but could not get them to work either.
(Date_To_Check == "00/00/0000" || (DT_Date)Date_To_Check < (DT_DATE)"1753-1-1") ? NULL(DT_DATE) : (DT_Date)Date_To_Check
and
ISNULL([Column 0]) || LEN(TRIM((DT_WSTR,10)[Column 0])) == 0 || [Column 0]==”00/00/0000” NULL(DT_DATE) : (DT_DBDATE)((DT_WSTR,10)[Column 0])
Neither worked and again I think I was doing something wrong.
Does anyone have any suggestions on what I can do or how I can get these expressions to work?