Page 1 of 1

Can any body resolve this ?

Posted: Thu Jul 26, 2007 5:58 am
by balu124
Hi

My source table has one column date in the format of ddmmyyyy,I need the target table with three columns as dd ,mm,yyyy separately.

Posted: Thu Jul 26, 2007 6:18 am
by Maveric
Give a more descriptive subject next time. Use substring function in transformer in the field derivation like Inputfield[1,2], Inputfield[3,2], Inputfield[5,4].

Posted: Thu Jul 26, 2007 1:54 pm
by ray.wurlod
Look at the date conversion functions either in the Modify stage chapter or for the Transformer stage in Appendix A in the Parallel Job Developer's Guide - there are functions for extracting date components.

Posted: Thu Aug 16, 2007 7:04 am
by rumu
Use substring function in stage variable/field level derivation for the 3 out put fileds.

Posted: Thu Aug 16, 2007 8:32 am
by abc123
Maveric, there is no such function as InputField in Datastage 7.5.1A.
Rumu, there is no such function as substring in Datastage 7.5.1A.
Ray, from what I see in the transformer's date functions, none of them will do what he is trying to do.

It seems like this is his best option:

Left(IncomingCol,2): ' ,' : Right(Left(IncomingCol,4),2) : ',' : Right(IncomingCol,4)

Let me know what you guys think.

Posted: Thu Aug 16, 2007 8:51 am
by chulett
:? InputField isn't a function but a generic field name used in the example. And the square brackets *are* the substring operators in both PX and Server jobs.

You couldn't find the 'date component' functions Ray mentioned? He meant Appendix B, at least that holds the Functions in my 7.5.1A version:

MonthDayFromDate
MonthFromDate
YearFromDate

Etc.