I have a procedure which is called from external application. The procedure has a parameter time of bigint type. In the procedure I insert the time to my table to column of 'time' type. To convert bigint to time I use DATEADD:
DATEADD(S, @piHMSTime, '19700101')
Everything works fine but I get time in my table like this 22:59:57.0000000. How do I set a needed precision? I need only seconds or maybe 2 digits after point.