Hi Guru's,
we have a issue with DATE feild column,
From source we are getting varchar feild, this varchar is mapping to DATE feild in target.
Due to source is VARCHAR, we are getting CHARACTERS for this feild but target is date field.
due to this reason job getting aborted.
For source field the data type must be varchar, then how to eliminate the CHARACTERS from source field?
Please help me on this issue
Thanks in advance.
Issue with date...
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 24
- Joined: Wed Mar 19, 2008 1:13 am
Issue with date...
M.BALAJI
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Look in the import stage (Output tab/Format tab) under the Type Defaults category - there are Date formatting options. If you have a consistent date pattern in your input field, the format string option will help convert it automatically from char/varchar to date using that format string.
For example, if you are recieving '2008-01-01', then the format string would be %yyyy-%mm-%dd, which is actually the default. 10/01/2008 would be %dd/%mm/%yyyy, etc. If you have inconsistent or non-standard formats, then consider using a transform or buildop to convert to date. As chulett said, there are many different ways to convert it. You can also import as a string and use a modify stage to convert to date.
Brad
For example, if you are recieving '2008-01-01', then the format string would be %yyyy-%mm-%dd, which is actually the default. 10/01/2008 would be %dd/%mm/%yyyy, etc. If you have inconsistent or non-standard formats, then consider using a transform or buildop to convert to date. As chulett said, there are many different ways to convert it. You can also import as a string and use a modify stage to convert to date.
Brad
It is not that I am addicted to coffee, it's just that I need it to survive.