Issue convertin date record from a file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Sergiomho
Participant
Posts: 7
Joined: Wed Nov 09, 2011 12:45 pm

Issue convertin date record from a file

Post by Sergiomho »

The record in the file is:
2011-10-21 15:43:11


The file stage shows the record as:
2011-10-21 15:43:11

I use the TimeStamp transformation:
Name: TIMESTAMP.TO.DATE
Definition: Timestamp(%Arg1%, "DATE")
Arg1 = Timestamp

and this warning comes up:

..LandXfrm (Timestamp) transform error: Invalid timestamp input '2011-10-21 15:43:11
'

Thank you for your help!!
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Looking at the help files for TIMESTAMP.TO.DATE, it expects only one parameter, never having used it, are you sure you are able to use two parameters?

That aside, is the single quote on the second line a fault in your formatting or is that the actual error? If that's how the error was output, you must have a newline being consumed as part of the field.
Sergiomho
Participant
Posts: 7
Joined: Wed Nov 09, 2011 12:45 pm

Post by Sergiomho »

Hello Kryt0n, as I understand, this "Built-In" Transform, the "DATE" word between quotation marks is to indicate to what data type is going to be transformed/converted the supplied parameter/argument.

About the single quote mark, is how the director shows the "Event detail".

That single quote mark is not in the origin file, I supose the begin/end single quotes marks are put by DS so I don't know why DS puts the last one in a next line neither...
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Sorry, my fault, I thought you were specificying "DATE" in the TIMESTAMP.TO.DATE call, I didn't read properly!

It isn't the single quote I am interested in but whether it is picking up a carriage return as part of your field thus making the timestamp invalid. How have you defined your row delimiter? And do a hex dump of your data file and check the actual delimiter matches what you've defined
Post Reply