I am trying to get time back from the not so beloved ‘Seconds past midnight’ form into a nice user friendly hh:mm format. Am I able to use truncate or am I just heading in the wrong direction on this?
I use this in my SQL stored procedures that deal with the seconds past midnight. Haven’t tried it in a BAQ. This is will convert it to a 24hr time format. This was pulled from a SP that pulls from Erp.PartTran.
RIGHT('0' + CAST(Systime/ 3600 AS VARCHAR),2) + ':' + RIGHT('0' + CAST((Systime / 60) % 60 AS VARCHAR),2) + ':' + RIGHT('0' + CAST(Systime % 60 AS VARCHAR),2) AS Time,