I have a file with the below values in one of the date field:
Field_Name : Post_DT
10:00:09
1111:11
14:54:37
09:08:07
20170812
The date column will have both time and date, if I get time then it has to be replaced with current_date while loading into target table and date will be as such, so have wrote this below constraints in Transformer.
Code: Select all
If len(Post_DT) = 8 then
If IsValid('Date', StringtoDate(Post_Dt, "%yyyymmdd%")) = 1 then
StringtoDate(Post_Dt, "%yyyymmdd%)
Else If IsValid('Time', StringtoTime(Post_Dt, "%hh:nn:ss%")) = 1 then
Current_Date()
Else SetNull()
Else SetNull()
had the output like this in table,
2017-08-23
2017-08-23
2017-08-23
2017-08-23
2017-08-12
Can somebody help me to get rid of this warning message?
Thanks..