Page 1 of 1

Modify to "truncate" timestamp

Posted: Thu Jul 27, 2006 10:35 pm
by Hesubo
I have a need to drop the time portion of a timestamp and store the data back into a timestamp field. The result basically changing the time portion to 00:00:00

Ive tried the following:

trans_dt = Timestamp_From_date(Date_From_Timestamp(tdatetime))

but am receiving the following error:

main_program: Error parsing modify adapter: Error in binding: Expected ')', got: "("
Expected destination field selector, got: ")"; input:
KEEP trans_dt
;
trans_dt = Timestamp_From_date(Date_From_Timestamp(tdatetime))

Please bear with me as I am new to using the Modify stage. I'm attempting to convert from using the transformer stage as recommended in the video tech tip.

The code in the transformer stage that I am replacing is:
TimestampFromDateTime(TimestampToDate(DSLink37.TDATETIME) ,"00:00:00")

Thanks in advance for the help

Posted: Thu Jul 27, 2006 10:43 pm
by Hesubo
I've just noticed a comment in another post that indicates nested functions are not permitted in Modify stage. That must be my problem.

Given that, can I accomplish what I desire through some other method in the Modify stage or should I stick with the transformer stage?

Re: Modify to "truncate" timestamp

Posted: Sun Jul 30, 2006 11:30 am
by kura
yes, nested function is not compatible with MODIFY stage.

Depending upon how many transformation you do and volume of the data. I would choose either of Modify vs Transformer.

From my experience I recommend Modify.

Posted: Sun Jul 30, 2006 6:18 pm
by meena
Hi Kura,
I like to know why you prefer using Modify stage while we can do this in the Transformer stage too.I am new to DS.Willing to know the difference between them.

Thank you....

Posted: Sun Jul 30, 2006 11:17 pm
by balajisr
meena wrote:Hi Kura,
I like to know why you prefer using Modify stage while we can do this in the Transformer stage too.I am new to DS.Willing to know the difference between them.

Thank you....
Because modify is much efficient than transformer stage.

Posted: Sun Jul 30, 2006 11:31 pm
by meena
Hi balajisr
Thank you...I got it.

Code: Select all


Because modify is much efficient than transformer stage


Posted: Mon Jul 31, 2006 5:11 am
by kumar_s
Check the post "Difference between Transformer Stage and all other stage". You can also find the controversial fact given by Pneuma Lin and opdas. you can also find the interesting Vincents bog.