Page 1 of 1

Timestamp issue when using Pivot Stage

Posted: Thu Dec 10, 2015 3:59 am
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.

Posted: Thu Dec 10, 2015 4:31 am
by ray.wurlod
You're passing it a time (00:00:00) rather than a timestamp.

Posted: Thu Dec 10, 2015 6:33 am
by Sandeepch19
Yes I am passing the values as date:00:00:00.000

Re: Timestamp issue when using Pivot Stage

Posted: Thu Dec 10, 2015 7:13 am
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.

Re: Timestamp issue when using Pivot Stage

Posted: Thu Dec 10, 2015 7:24 am
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.

Posted: Thu Dec 10, 2015 8:07 am
by chulett
So check with support.

Posted: Thu Dec 10, 2015 9:09 am
by Sandeepch19
Do we have any other resolution apart from doing patch update?

Posted: Thu Dec 10, 2015 10:07 am
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.

Posted: Thu Dec 10, 2015 12:24 pm
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?.

Posted: Thu Dec 10, 2015 1:10 pm
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...

Posted: Fri Dec 11, 2015 9:49 am
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()