APT_CombinedOperatorController

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
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

APT_CombinedOperatorController

Post by irajasekharhexa »

Hi I am using the function StringtoDate(Jobparameter,"%yyyy-dd-mm%")

But getting warning and no records are populating into the target.
APT_CombinedOperatorController,0: Conversion error calling conversion routine date_from_string data may have been lost
Peek_12,0: Date:**********

Could you please tell me what could be the problem
Searched in the forum but not found.


Regds

Rajasekhar
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Posting a sample of your input data for this field here would help. Check if the year date and month are actually separated by "-". Also see if the date and month are always 2 characters or digits.
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

Post by irajasekharhexa »

Maveric wrote:Posting a sample of your input data for this field here would help. Check if the year date and month are actually separated by "-". Also see if the date and month are always 2 characters or digits.
My input data is 20070101 and expected resulut is 2007-01-01


Thanks
Rajasekhar
stefanfrost1
Premium Member
Premium Member
Posts: 99
Joined: Mon Sep 03, 2007 7:49 am
Location: Stockholm, Sweden

Post by stefanfrost1 »

if your string is formatet 20070101 then you need to specify that format in StringToDate(InLink.DateCol1, '%yyyy%mm%dd')
-------------------------------------
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Try this. "%yyyy%dd%mm". What you are mentioning here is the format of your input. Since there is no "-" in your input data and u have specified it in the format, you were getting this warning.
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

Post by irajasekharhexa »

Maveric wrote:Try this. "%yyyy%dd%mm". What you are mentioning here is the format of your input. Since there is no "-" in your input data and u have specified it in the format, you were getting this warning.
StringToDate(pEFFECTIVE_DATE,"%yyyy%mm%dd"%]) I am using a jobparameter PEFFECTIVE_DATE which has the string type 20070101 value now tell me what could be the derivation at the derivation column to get the output 2007-01-01
Rajasekhar
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

Post by irajasekharhexa »

irajasekharhexa wrote:
Maveric wrote:Try this. "%yyyy%dd%mm". What you are mentioning here is the format of your input. Since there is no "-" in your input data and u have specified it in the format, you were getting this warning.
StringToDate(pEFFECTIVE_DATE,"%yyyy%mm%dd"%]) I am using a jobparameter PEFFECTIVE_DATE which has the string type 20070101 value now tell me what could be the derivation at the derivation column to get the output 2007-01-01
(pEFFECTIVE_DATE,"%yyyy%mm%dd"%) is showing invalid expression
and StringToDate(pEFFECTIVE_DATE,"%yyyy-mm-dd"%) is not giving the right output
Rajasekhar
irajasekharhexa
Premium Member
Premium Member
Posts: 82
Joined: Fri Jun 03, 2005 5:23 am
Location: Bangalore
Contact:

Post by irajasekharhexa »

irajasekharhexa wrote:
irajasekharhexa wrote:
Maveric wrote:Try this. "%yyyy%dd%mm". What you are mentioning here is the format of your input. Since there is no "-" in your input data and u have specified it in the format, you were getting this warning.
StringToDate(pEFFECTIVE_DATE,"%yyyy%mm%dd"%]) I am using a jobparameter PEFFECTIVE_DATE which has the string type 20070101 value now tell me what could be the derivation at the derivation column to get the output 2007-01-01
(pEFFECTIVE_DATE,"%yyyy%mm%dd"%) is showing invalid expression
and StringToDate(pEFFECTIVE_DATE,"%yyyy-mm-dd"%) is not giving the right output

Hi All

StringtoDate(pEFFECTIVE_DATE,"%yyyy%mm%dd")

This Working fine and giving correct output.

Thanks for your valuable time spent and reponse.


Regds
Rajasekhar
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

You will have to tell us. Is your input date format yyyyddmm or yyyymmdd?

And this is what i told you to try"%yyyy%dd%mm" And this is what you have tried ""%yyyy-mm-dd"%". Are they the same?
Post Reply