function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Veerendar AellaVeerendar Aella 

custom field to track last login days

NagendraNagendra (Salesforce Developers) 
Hi Veerender,

Please try something like this.
public DateTime lastlogin{get;set;}

controller:
User u = [SELECT LastLoginDate FROM User WHERE Id =:UserInfo.getUserId()];
lastlogin = u.LastLoginDate;


VF: {! lastlogin }

For more information please refer to below link which might help you further. ​​​​​​​Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
​​​​​​​Nagendra