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

check whether the user log in first time or more in the same day



 I am in need of creating splash screen when a user first login in a particular day . It need to be shown when he come again in a same page . But i tried to use session i am unable to find it.


Suggestions required as early as possible 

Thanks in advance 

Best Answer chosen by Admin (Salesforce Developers) 

You can use the "LastLoginDate" (Standard field of User Object)  to check whether he is logging for the first time in a day or not.



If the value of "LastLoginDate" field is today() date, then user is logging in for second time or more than that.


if that is less than today, then the user is logging for the first time in that day.