Global T-SQL variable @@lastlogindate is available to each user login session. A datetime datatype, its value is the lastlogindate column for the login account before the current session was established. This variable is specific to each login session and can be used by that session to determine the previous login to the account. If the account has not been used previously or “sp_passwordpolicy 'set', enable last login updates” is 0, then the value of @@lastlogindate is NULL.