is there any way to know how long does a logged in after last time a player logged out.
And also how can i make it so i will know that player has used this today then he has to wait till next day to use it again.
Set a variable when someone logs out with world.time
When someone logs in, take the (current world.time - last logged out time) tick * 10 sec/tick * 60 min/sec for how long the difference in minutes.

Note that this method is based on how long the server has been up. If you want to see how long the person him/her self has been gone, there's time2text() & world.realtime... or some forum searching.

Has used what today? A function? Well, its quite simple:
if(world.realtime < (last_used_world_realtime + 10 sec/ticks * 60 min/sec * 60 hr/min * 24 day/hr))
It hasn't been a complete day yet!

That's for an exact 24 hrs wait. If you want to check merely the date change (ex: you can use it at 11:58 PM then again at 12:02 AM in the next few minutes), store the day/month/year using time2text() as the variable, ex: "MMDDYY". Then just compare to see if the dates are different
if( stored MMDDYY <> current MMDDYY )
Do what you want.
stored = current MMDDYY