Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Get report for daily user login

prasadpatil16
New Contributor III
New Contributor III

Hello Experts,

I want to develop analytic report for getting daily login details for user. I have below query just need help to filter this for todays date.

select u.username,u.firstname,u.lastname,l.logintime, l.LOGOUTDATE from userlogins l,users u where l.USERKEY=u.userkey and l.logintime >= sysdate()-1

Sysdate format is Mar 28, 2024 09:31:06 and when I say >= it pick records from data from particular date and time. 

Thanks,

Prasad

1 REPLY 1

prasadpatil16
New Contributor III
New Contributor III

Below Query work for me

 

select l.userkey,u.username,u.firstname,u.lastname,l.logintime, l.LOGOUTDATE from userlogins l,users u where l.userkey=u.userkey and l.userkey= 45 and date_format(l.logintime, '%Y-%m-%d') >= date_format(sysdate(), '%Y-%m-%d')