T_stamp appending error in python, unable to convert to type

I don't know why this didn't give me an issue last time, but this time I am getting an error.

currentTransaction= nextRow['t_stamp']
dataOut.append([currentTransaction, '', '','Totals','',hoursSum,str(uptimeSum),

If I try:


I get an error that is must be a number or string, not : '2022-10-11 11:59:.003'

I think last time, I had made a column in SQL using: format( )
So my transaction column was a string?
Now I have a legit timestamp that I am trying to append from a t_stamp in SQL into a python dataset append.

Re-examine your assumptions. You are placing a timestamp in a variable whose name includes "transaction". That's more than a bit odd, and suggests that you are making a mistake at that line. Or you have crappy variable names that are confusing you.

In any case, timestamps that are instances of java.util.Date are not numbers, and therefore don't work with int().

Show more of your current code.

1 Like

Thanks for your help.
I just tried int() to see if I could get more data from the error codes.

The code is similar to this, except I am trying to use it for a different dataset.

Is row 4 column 2 the 4th down and 2nd over, or does it count zeroes?

Ah, Okay, my issue was that I tried to pass a blank string to an integer on the shift column that expected an integer.
The date worked.