+ Start a Discussion
ekarthikekarthik 

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

Hi

 

 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) 
harsha__charsha__c

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.