June 23, 2015 at 11:26 pm
hello,
I have used below conversion for date-time to find time from date.
LTRIM(RIGHT(Convert(VARCHAR(20), PGL.[In-Time],100),7))as In_Time,
LTRIM(RIGHT(Convert(VARCHAR(20), PGL.[Out-Time],100),7)) as Out_Time
Now I have to calculate time difference? How can I do it?
please suggest...
Reply awaited..
June 23, 2015 at 11:54 pm
You can use DATEDIFF for time as well as dates. No need for the conversion - just DATEDIFF(second/minute/hour, In-Time, Out-Time)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply