Converting SysTime to Regular Time on PartTranHist Tracker

Hi all!

I have been tasked with creating a customization that will allow users to see the time associated with a part transaction formatted in a normal (HH:MM:SS, or HH:MM) style on the Part Transaction History Tracker.

The issue I am experiencing is trying to find the method or form event that will run the custom code/ conversion when the “Retrieve” button is pressed and the UltraGrid is populated and only when the button is pressed. I’ve seen a few topics about the conversion methods used but nothing specifically mentioning how to effectively and quickly implement the conversions


This is the code I currently have in the customization creating the column for the converted time, and a function that I am using for debugging that just pops up the current system time for each record sequentially.

Ideally the column for “Time” would already be populated when the actual data shows up in the UltraGrid, as it stands there is a slight delay after the data is populated before the message boxes start appearing.

Any input or suggestions would be welcome!

I think this may help you.

1 Like

I saw that thread earlier while doing some googling, while this is helpful for the actual act of converting SysTime to regular time I am having more difficulty finding where to place this conversion into the customization so that it fires when I want it to.

I do this in a post processing bpm on PartTranHist.RunPartTranHistory. I set a string field to the expression below.

((int)(ttPartTranHistRow.SysTime/3600.00)).ToString("00") + 
":" +  ((int)(((ttPartTranHistRow.SysTime / 3600.00) - (int)( ttPartTranHistRow.SysTime / 3600.00)) * 60 )).ToString("00")

1 Like

This worked thanks!
For people who may have this question in the future: I had to create a UD field in PartTran with the string type in order to select it to be populated in the post-processing method directive. I then had to make it say “all rows” so every row was updated with the new time.