Hello,
I'm trying to do a simple test and replace for a date on an ODBC data source (Foxpro) and output to a MS SQL Server table. There are some dates in the source file of 30/12/1899 which I would like to replace with null values on the output.
Nothing appears to be working for me and I get blanks in the output each time. However, when I ask for a "Data Preview" I get the correct results (see attached).
When I use a "Mapped to" I get the correct results on the output. But if I leave the calculated field formula in, I get nothing in the output (ie - I have to physically delete the calculation for the mapped field to work.
I must be missing something in the coding....please let me know what I should be using for this....thanks
I've also tried:
Iif(RightString([PROSDATE],4)=='1899','',[PROSDATE]) which gives the same results as the Date and DateS functions.
No Output:
Iif(YearS([PROSDATE],'DD/MM/YYYY')=='1899','',[PROSDATE])
Iif(YearS([PROSDATE],'DD/MM/YYYY')=='1899','01/01/2010',[PROSDATE])
YearS([PROSDATE],'DD/MM/YYYY')
Works OK:
YearS('30/12/2009','DD/MM/YYYY')
Thanks,
Joe