Error while converting date format

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
kumar3846
Participant
Posts: 36
Joined: Mon Jan 09, 2006 2:58 pm

Error while converting date format

Post by kumar3846 »

Hi all,


I am getting error while converting date formats

here in my job iam converting date to string format and

again iam doing string to date conversion here is my logic

DateToString(a,"%yyyy-%mm-%dd")= b
If IsNull(b) Then SetNull() Else StringToDate(((b)[6, 2]:(b)[9,2]:(b)[1,4]),'%mm-%dd-%yyyy')


while doing this process iam getting warning :

APT_CombinedOperatorController,1: Conversion error calling conversion routine date_from_string data may have been lost

and in the target dataset its showing data as *******

pls help me out this



Thank you very much
Last edited by kumar3846 on Fri Sep 15, 2006 8:43 am, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Edit your post - check "Disable Smilies in this post" so that we can see the actual expression.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

Kumar,

Your smileys hide the key information..
kumar3846
Participant
Posts: 36
Joined: Mon Jan 09, 2006 2:58 pm

Post by kumar3846 »

thank you for ur response i have disables the smileys thank you
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Try this

Code: Select all

StringToDate(((b)[6, 2]:(b)[9,2]:(b)[1,4]),'%mm%dd%yyyy') 
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply