I executed the query on my production server.
select s.session_id, s.login_time, s.is_user_process, c.session_id, c.connect_time, case when c.Connect_Time <=s.login_time then 1 else 0 end AS is_connect_time_earlier_than_login_time from sys.dm_exec_connections AS c JOIN sys.dm_exec_sessions AS s on s.session_id = c.session_id
Here is the snippet of the output.
session_id login_time is_user_process session_id connect_time is_connect_time_earlier_than_login_time
167 2018-01-18 20:27:14.330 1 167 2018-01-18 20:12:50.747 1
171 2018-01-18 20:12:57.340 1 171 2018-01-18 20:12:57.347 0
Is there an explanation whey the 2nd row shows that the connect_time is later than the login_time ? OR is it a case of the reported time resolution not being too good in the millisecond range ?