and more in a single search tool across platforms. Read the announcement here. |
03/28/2024 02:32 AM - edited 03/28/2024 03:08 AM
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
Solved! Go to Solution.
03/28/2024 03:45 AM
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')