date Format YYYYMMDD check
Moderators: chulett, rschirm, roy
date Format YYYYMMDD check
Hi,
We need to check the date format in the source column,
If format is YYYYMMDD then we need to send to Target else reject the record,
Ex: data:20080927 ---it is fine
data:20082708----it is wrong
data:00000000----it is wrong
Let me know how to check this format,
We need to check the date format in the source column,
If format is YYYYMMDD then we need to send to Target else reject the record,
Ex: data:20080927 ---it is fine
data:20082708----it is wrong
data:00000000----it is wrong
Let me know how to check this format,
I guess that would be a valid date, so you would need to have a special condition (ie. ignore 0000-00-00) apart from checking whether its a date.
As to know whether it is a date or not, there are date functions available, you could apply your own logic on them to know whether its a valid date or not.
As to know whether it is a date or not, there are date functions available, you could apply your own logic on them to know whether its a valid date or not.
IsValid() is the correct route to take. What isn't working with that function?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Hi All,
With out writing any logic in transfomer stage,we can reject the records which not matching to our date format by using sequential file itself.
If we goto "FORMAT" TAB in seqential file there we have to mention our required date format.so that it will reject the records which not matching to the our specified format.
With out writing any logic in transfomer stage,we can reject the records which not matching to our date format by using sequential file itself.
If we goto "FORMAT" TAB in seqential file there we have to mention our required date format.so that it will reject the records which not matching to the our specified format.
Hi sankar ,
I just tried using the date format in sequential file under [b]Type defaults [/b]option by giving a date format other then the incomin format ..
But when i run the job i saw that it make no difference and all records go to the destination file. I think it will not consider that format coz that is used only in case of Type Default cases.
plz try ur self once
I just tried using the date format in sequential file under [b]Type defaults [/b]option by giving a date format other then the incomin format ..
But when i run the job i saw that it make no difference and all records go to the destination file. I think it will not consider that format coz that is used only in case of Type Default cases.
plz try ur self once
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom