Attempt to convert String value
Moderators: chulett, rschirm, roy
Attempt to convert String value
how to convert a String value "02-JUN-04" to Timestamp
Last edited by adams06 on Wed May 03, 2006 3:46 pm, edited 1 time in total.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Oconv(Iconv("26-APR-06", "DDMY"), "D-YMD[4,2,2]") : " 00:00:00"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
conversion error
Hi Ray,
Input is coming in this format 04/26/2006 14:19:11
but i am getting error as
TABLE1..Transformer_1: At row 200, link "TO", while processing column "U_LOAD_TS"
Attempt to convert String value "26-APR-06" to Timestamp type unsuccessful
how to resolve this.
Thanks in advance.
Input is coming in this format 04/26/2006 14:19:11
but i am getting error as
TABLE1..Transformer_1: At row 200, link "TO", while processing column "U_LOAD_TS"
Attempt to convert String value "26-APR-06" to Timestamp type unsuccessful
how to resolve this.
Thanks in advance.
ray.wurlod wrote:...Code: Select all
Oconv(Iconv("26-APR-06", "DDMY"), "D-YMD[4,2,2]") : " 00:00:00"
error
TIMESTAMP(Iconv(date column,"D DMY[,A3,2]"))
its returning a NULL value
its returning a NULL value
pkomalla wrote:You can use the following derviation in the transformer
TIMESTAMP(Iconv(date column,"D DMY[,A3,2]"))
It works....
TIMESTAMP is in DS Transforms/built-in/date
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You changed the question. Originally you asked about DD-MMM-YY, and my answer handled that. Now you specify that there's a time component too, which necessarily changes the rules. Iconv() won't work with the date and time in one string. Try
Code: Select all
Oconv(Iconv(Field(InLink.TheCol, " ", 1, 1), "DDMY"), "D-YMD[4,2,2]") : InLink.TheCol[Col2(), 7]
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.