Hi ,
I have a col of char '8' and another of char '10'. Using stringToDate() function I'm trying to convert these columns to a date, with the default date format. But it's not working. The job is getting aborted.
Well I'm putting following in the derivation
StringToDate(inData.Date1) -- and trying to store it in the Date , data type column.The i/p data is in the YYYYMMDD format and I want the same in the o/p so I'm not giving any format string.
Can anybody plz tell me , what mistake I'm doing?
Thanks.
Date Conversion
Moderators: chulett, rschirm, roy
Hi Bilwakunj,
Before we go ahead I need some info
1. What is the error message you are getting when the job got aborted?
2. How do you confirm that it is because of StringToDate function used in the Transformer?
We have used char(10) columns from input and have coverted them into Date using the StringToDate function and we did not face any problems.
My suggestion is that you take the input, do the transformation and load it into a dataset. Try to view the dataset. If you get ******* then it is definitely a problem with the incoming data or the formatting option you are using.
HTH
Rich
Before we go ahead I need some info
1. What is the error message you are getting when the job got aborted?
2. How do you confirm that it is because of StringToDate function used in the Transformer?
We have used char(10) columns from input and have coverted them into Date using the StringToDate function and we did not face any problems.
My suggestion is that you take the input, do the transformation and load it into a dataset. Try to view the dataset. If you get ******* then it is definitely a problem with the incoming data or the formatting option you are using.
HTH
Rich
-
- Participant
- Posts: 75
- Joined: Tue May 13, 2003 4:14 am
- Location: California
- Contact:
Date format
Hi,
Yours source column must be String type i.e varchar
You also specify the I/P Source format.
Syntax: StringToDate(Column,"source column format ")
In your case
ex:StringToDate(DateLiknk.Date1,"%yyyy%mm%dd")
This will work.
Rgds
Thiru
Yours source column must be String type i.e varchar
You also specify the I/P Source format.
Syntax: StringToDate(Column,"source column format ")
In your case
ex:StringToDate(DateLiknk.Date1,"%yyyy%mm%dd")
This will work.
Rgds
Thiru
Re: Date format
Thanks...it worked
Bilwakunj
Bilwakunj
vbeeram wrote:Hi,
Yours source column must be String type i.e varchar
You also specify the I/P Source format.
Syntax: StringToDate(Column,"source column format ")
In your case
ex:StringToDate(DateLiknk.Date1,"%yyyy%mm%dd")
This will work.
Rgds
Thiru