Convert PartTrans.SysTime to actual time?

Then there is always…

SELECT 
	FORMAT(DATEADD(SECOND, PartTran.SysTime, CAST(PartTran.SysDate as DateTime)), 'HH.mm') as time1,
	DATEADD(SECOND, PartTran.SysTime, CAST(PartTran.SysDate as DateTime)) as time2,
	* 
FROM Erp.PartTran

image

I do prefer the simple division, shorter syntax. :slight_smile: However if you use DATEADD with something like PayHours it would honor 24 and + and actually get you the ‘correct’ clock out date as well. There is a time and a place for everything :slight_smile:

In this case division should suffice.

4 Likes