I’ve created a BAQ / Dashboard to show items being placed in the QA Rack . Parts clocked into an Operation created before any QA related OPR . These are active transaction to be shown and refreshed every 5 minutes . I am trying to show the duration on the parts sitting on the Rack . Epicor support suggested to use DateDiff , but that function is not applicable in E9 . I’ve tried the below with no success . If anyone could point me in the right direction would be much appreciated
I looked at my database and did a very basic calc on SysTime (PartTran.SysTime - 1) in a query and it worked. I am seeing time fields in Epicor stored as integer. My calculated field worked setup either as integer or decimal.
I was curious how the time data stored as int was actually a time on the clock. Looking into seconds calculation, per below, that looks to be what it is.
IDK if this helps at all, but hopefully it steers you in the right direction. We are on E10.
@Nancy_Hoyt you are correct. Epicor will store time as seconds a lot. I think they do this because they will use these columns sometimes as foreign key fields with transaction level tracking. We use the following SQL statement to convert it to an actual time and store in it a nvarchar field in data warehousing.
Thank you Nancy for taking time and effort to do some case study . As you can see at the below screenshot . I can actually get the System Time in HH:MM and also the Clock in Time from MES in HH:MM . I would like to know in E9 , the interval calculation between both time in minutes . Epicor support is not being very helpful at this point of time
I looked and I had never used interval in any routines. This was much simpler than you would think. The calc below gives you a decimal result, but you only care about checking over X, so it will work.
@Mi3kel@gpayne@Nancy_Hoyt,
i do not know if this will help to simplify what you want or not, and i have noticed that you are not taking into consideration the date change, and i think this is important when working on the LaborDtl table, so i created this SQL equation to calculate the difference in minutes time for each transaction between ClockInDateTime and CurrentDateTime, this one equation will take into consideration the different in days as well as time, and can be altered to any other time unit if you want and to any other date you want i.e. replace GETDATE() by any other date