Warning for timestamp_from_string

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Warning for timestamp_from_string

Post by eze_ke »

Hi

I did a search with the error in the forum but could not resolve the issue
Warning:--Detail_Tfm,0: Conversion error calling conversion routine timestamp_from_string data may have been lost

Ora----->Tfm------>seq

I am extracting from Oracle view and writing to a sequential file
One of the date field in Oracle is defined as varchar(8) (20071109)
When I am trying to convert it to time stamp (%yyyy-%mm-%dd %hh:%nn:%ss) i am getting the following error
""" Detail_Tfm,0: Conversion error calling conversion routine timestamp_from_string data may have been lost """

In the Stage Variable:-

StringToTimestamp(((LOT_Daily_Read_Lnk.STRING_DT[1,4]:'-':LOT_Daily_Read_Lnk.STRING_DT[5,2]:'-':LOT_Daily_Read_Lnk.STRING_DT[7,2]) : " 00:00:00") ,"%yyyy-%mm-%dd %hh:%nn:%ss")


Please Suggest

Appreciate Your Help

Thanks
MAM
Thank
eze
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try

Code: Select all

StringToTimestamp(in.Date:" 120000","%yyyy%mm%dd %hh%nn%ss") 
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Post by eze_ke »

still i am getting the same warnings

""""Detail_Tfm,0: Conversion error calling conversion routine timestamp_from_string data may have been lost""""
Thank
eze
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Are you getting that error for each and every row or just a few rows?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Post by eze_ke »

i am getting 5 warnings
incomming 103631 rows --- > written to Seq file 103631
Thank
eze
craviraj
Participant
Posts: 17
Joined: Mon Jun 12, 2006 5:17 am
Location: Secunderabad

String To TimeStamp

Post by craviraj »

Hi eze_ke,

May be space is missing between date and hours while giving the syntax:
StringToTimestamp(stg1,"%yyyy-%mm-%dd %hh:%nn:%ss")

I had used 2 stage variables as given by you:
stg1 = stg[1,4]:"-":stg[5,2]:"-":stg[7,2]:" 00:00:00"
stg = '20071109'

..and the job ran without errors.

~ R-Square
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

with my syntax, you do not need any stage variables. The input mask will take care of the input format.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply