Timestamp issue when using Pivot Stage

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
Sandeepch19
Participant
Posts: 36
Joined: Fri May 21, 2010 12:40 am
Location: Bangalore

Timestamp issue when using Pivot Stage

Post by Sandeepch19 »

I am converting rows into columns so am using pivot stage. But while doing that am getting below warning for timestamp field. When I run the job without Pivot stage am not getting this warning. So it is something to do with Pivot stage. Can anyone give an advise as to how this warning could be resolved.

Warning is as below.
Data string '00:00:00' does not match format '%yyyy-%mm-%dd %hh:%nn:%ss': the value for tag %yyyy has fewer characters than expected.
Sandeep Chandrashekar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You're passing it a time (00:00:00) rather than a timestamp.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sandeepch19
Participant
Posts: 36
Joined: Fri May 21, 2010 12:40 am
Location: Bangalore

Post by Sandeepch19 »

Yes I am passing the values as date:00:00:00.000
Sandeep Chandrashekar
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Re: Timestamp issue when using Pivot Stage

Post by qt_ky »

Sandeepch19 wrote:Warning is as below.
Data string '00:00:00'
According to the quoted warning, you only passed the time part.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Sandeepch19
Participant
Posts: 36
Joined: Fri May 21, 2010 12:40 am
Location: Bangalore

Re: Timestamp issue when using Pivot Stage

Post by Sandeepch19 »

When I checked in google I came across one solution where we need to update some patch because there is an issue with Pivot Stage in handling TimeStamp.
Sandeep Chandrashekar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So check with support.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sandeepch19
Participant
Posts: 36
Joined: Fri May 21, 2010 12:40 am
Location: Bangalore

Post by Sandeepch19 »

Do we have any other resolution apart from doing patch update?
Sandeep Chandrashekar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Fix your issue? You may think you are appending that zero time to a date but the error message says you are not, so I would ensure your dates are always valid before you add the time as all it takes is one bad apple to cause that message.

If you are sure everything you are doing is fine, contact support and see if there is even such a patch.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sandeepch19
Participant
Posts: 36
Joined: Fri May 21, 2010 12:40 am
Location: Bangalore

Post by Sandeepch19 »

Thank Craig.. Its not that i think but i am appending 0's . Isvalid function is also used to check the validity of the data. anyone faced this kind of issue earlier and resolved it?.
Sandeep Chandrashekar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I know you are appending zeroes, the 'think' part was as to the validity of the date as in are you appending them to a valid date? We'd need to see your "IsValid" logic to check out that part of the puzzle...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sandeepch19
Participant
Posts: 36
Joined: Fri May 21, 2010 12:40 am
Location: Bangalore

Post by Sandeepch19 »

My Date Validation Logic is like this

Code: Select all

If INDATE <> ""  Then
  If IsValid('Date', INDATE[1,4] : "-" : INDATE[5,2] : "-" : INDATE[7,2]) = 1 Then
     StringToDate(INDATE,"%yyyy%mm%dd")
  Else SetNull()
Else SetNull()
Sandeep Chandrashekar
Post Reply