Page 1 of 1

APT_CombinedOperatorController

Posted: Thu Oct 25, 2007 5:33 am
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


Posted: Thu Oct 25, 2007 6:20 am
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.

Posted: Thu Oct 25, 2007 6:30 am
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

Posted: Thu Oct 25, 2007 6:47 am
by stefanfrost1
if your string is formatet 20070101 then you need to specify that format in StringToDate(InLink.DateCol1, '%yyyy%mm%dd')

Posted: Thu Oct 25, 2007 6:57 am
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.

Posted: Thu Oct 25, 2007 7:37 am
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

Posted: Thu Oct 25, 2007 7:40 am
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

Posted: Thu Oct 25, 2007 7:56 am
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

Posted: Thu Oct 25, 2007 8:05 am
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?