+ Start a Discussion

Login Hours from Apex



I have a requirement to monitor all the users login hours. Everyday, the first time they login to salesforce, I need to record their timings. 

Does any one have an idea on this?


Thanks for any help!


There is a lastlogindate field on User which you can query but there is no way to know when they logged out.  There is also a login history feature that may help under setup > administration setup > manage users > login history