type conversion
Moderators: chulett, rschirm, roy
type conversion
Hi-
I have one funny thing going on with my job.
One of the fields in my job needs string to timestamp conversion for that
I used the fallowing function.
StringToTimestamp((DSLink5.SrcFileDt): "00:00:00","%yyyy-%mm-%dd %hh:%nn:%ss")
This is working good.
But when I use the same function in another job
for the same field it's giving output **********
Anybody can tell what might be the reason.
Thanks.
I have one funny thing going on with my job.
One of the fields in my job needs string to timestamp conversion for that
I used the fallowing function.
StringToTimestamp((DSLink5.SrcFileDt): "00:00:00","%yyyy-%mm-%dd %hh:%nn:%ss")
This is working good.
But when I use the same function in another job
for the same field it's giving output **********
Anybody can tell what might be the reason.
Thanks.
-
- Participant
- Posts: 73
- Joined: Tue May 10, 2005 6:21 pm
- Location: Sydney
Re: type conversion
That means StringToTimestamp fails. Check the format of the input value where you got the output **********.
laxmi_etl wrote:Hi-
I have one funny thing going on with my job.
One of the fields in my job needs string to timestamp conversion for that
I used the fallowing function.
StringToTimestamp((DSLink5.SrcFileDt): "00:00:00","%yyyy-%mm-%dd %hh:%nn:%ss")
This is working good.
But when I use the same function in another job
for the same field it's giving output **********
Anybody can tell what might be the reason.
Thanks.
Edward Yuan
-
- Participant
- Posts: 48
- Joined: Wed Jun 01, 2005 7:10 am
Ok, source field data is in 20050503 (sting) format I want to conver it to timestamp.mansoor_nb wrote:You will get these kind of results if your source string field is converted properly into the timestamp format before conversion or there migght be nulls in your source string column.
If there are nulls then check for nulls and then convert it into timestamp.
Bisically I am getting ****** type of data in the output file for each and every record.
There are no nulls as you said.
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
Re: type conversion
The only difference in you previous post's code and new one is Trim function. Try using trim here. Also check the length of the field in the target.laxmi_etl wrote: But when I use the same function in another job
for the same field it's giving output **********
Thanks.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Thomas Alva Edison(1847-1931)
Its not only trim, but the pattern that you use to convert.
"%yyyy-%mm-%dd %hh:%nn:%ss" is what you had given, but actual current pattern is no '-'s delimited.
"%yyyy-%mm-%dd %hh:%nn:%ss" is what you had given, but actual current pattern is
Code: Select all
"%yyyy%mm%dd %hh:%nn:%ss"
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: