I’m using the ResourceTimeUsed table - starttime (which is integer) or I can use the LoadHour which is a decimal format - but need it to display in HH:MM format
ie: ResourceTimeUsed.StartTime is 35460 >99,999
ResourceTimeUsed.LoadHour is 9.85 >9,99
Both are equal to 9:51am (time offset from Midnight value of 0)
I’ve tried creating a calculated field but not having any luck with the functions available to convert to format I need properly.
JobOper Table - fields are empty - so I guess after global scheduling the data is stored in the ResourceTimeUsed table since it is not ‘permanent’.
The second format is a decimal representation of an hour and a similar google search
“decimal hour to hour minute second SQL” yields the code below as a solution
SELECT CAST(CONVERT(VARCHAR,DATEADD(SECOND, 9.85 * 3600, 0),108) AS TIME)
You can also convert Epicor seconds from midnight as a calculated field this way:
CONVERT(varchar, DATEADD(ss, [SECONDS SINCE MIDNIGHT VALUE], 0), 108)
I have had to use this many times to convert to HH:MM:SS
(you can encapsulate this in REPLACE to remove the “:”)
The 108 & 114 values are date/time formats
Here is a list of available formats: Date and Time Conversions Using SQL Server