Page 1 of 1

Convert VARCHAR to Date

Posted: Tue Dec 26, 2006 3:44 am
by amitendra_amit
Hai,

I'm trying to convert VARCHAR(40) data from an Oracle DB source on windows to date data format for an oracle output table.
My Source Column is (Start Date -(mm/dd/yyyy) )
Datatype : Varchar
Target Datatype is (Agg_Start Date) -(dd-mon-yyyy))
Datatype: Date.

I have tried this format : OConv(IConv(Dslink.Start_Date, "D"),"D-YMD[4,2,2]"):" 00:00:00"

And also I have tried this query also

Oconv(Iconv(Dslink.Start_Date, "D MDY[A,2,4]"),"D-YMD[4,2,2]")

When i run the job, i got this warning.

stgSURVEY_EXTERNAL_JOURNAL_REVENUE..Transformer: At row 1, link "LNK_ _PERIPHERAL_SURVEY", while processing column "START_DT"
Value treated as NULL
Attempt to convert String value "2006-12-31" to Date type unsuccessful.

What function/transform should I use?

Regards,

amit

Posted: Tue Dec 26, 2006 4:45 am
by ray.wurlod
This question looks suspiciously like this recent thread - are you on the same project?

Posted: Tue Dec 26, 2006 5:03 am
by amitendra_amit
Yes

Posted: Tue Dec 26, 2006 7:30 am
by chulett
:roll: Then why the heck not respond over there? Why start up the merry-go-round all over again?

Are you doing what was suggested there? The answer must be 'no' or it would be working. I'll wager you are using user-defined sql, yes?

Posted: Tue Dec 26, 2006 12:13 pm
by samythiru
Hi ,

Try writting server routine. May be it will help you.

Posted: Tue Dec 26, 2006 12:34 pm
by us1aslam1us
This topic has already been resolved in the other POST.