trying to truncate the string
Moderators: chulett, rschirm, roy
trying to truncate the string
Hi,
I am trying to truncate part of the string. This is the raw data.
1/1/2007 0:00:00
I only need date from this. How can i extract only the date.
I used Left function, not working. Is there any truncate function in datastage that I can use.
Thanks
I am trying to truncate part of the string. This is the raw data.
1/1/2007 0:00:00
I only need date from this. How can i extract only the date.
I used Left function, not working. Is there any truncate function in datastage that I can use.
Thanks
Welcome Aboard
Use the Field Function. Use DataStage help to see how it works.
For your problem, use this
Use the Field Function. Use DataStage help to see how it works.
For your problem, use this
Code: Select all
Field(in.Col, " ",1)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
I used this function. I am getting this error.DSguru2B wrote:Welcome Aboard :P
Use the Field Function. Use DataStage help to see how it works.
For your problem, use thisCode: Select all
Field(in.Col, " ",1)
Field(in.Col, "0:00:00 ",1)
it returned
"1/1/2"
Please correct me if I am doing this wrong.
-
- Participant
- Posts: 56
- Joined: Mon Oct 16, 2006 7:32 am
-
- Participant
- Posts: 56
- Joined: Mon Oct 16, 2006 7:32 am
As mentioned above use
You are using
Code: Select all
Field(in.Col, " ",1)
Code: Select all
Field(in.Col, "0:00:00 ",1)
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
Thanks so much function workedDSguru2B wrote:In the expression that i provided earlier, "in.Col" is your input column. You need to replace that with your inputlink.columnname. ...
but I am getting another error now
SQLSTATE=22008, DBMS.CODE=0
[DataStage][SQL Client][ODBC][Oracle][ODBC]Datetime field overflow.
Any suggestions.