Hi,
In a mysql table for a date column(login_time), i need to get the logins for
last 30 days, last 60 days.
Is there any way to do that?
Thanks.
Hi,
In a mysql table for a date column(login_time), i need to get the logins for
last 30 days, last 60 days.
Is there any way to do that?
Thanks.
this will give you the rows from the table where login_time is within the last 60 days:
SELECT * FROM table WHERE login_time >= SUBDATE(CURDATE(),INTERVAL 60 DAY)
similarly with 30 days.