Posted by J.O. Aho on 09/23/07 07:12
Beshoo wrote:
> TIME calculation please :-/
>
> hi gaiz !!
> just aim trying to make a fucntion to calculate a period of time
> aim making trfic website analysis I mean for example i must know
> when a user is logedon and logedOut So i can know the period he
> has spent in the site !!! ??
> Ofcourse i have the to time[when he login and logout] i am tring to
> make fucntion to caleculate the period between thes 2 time !!!!
>
> fore example i have loged in at :
>
> 12:30
> and logged out at :
> 1:10
>
> there must be 40 mints !!??
> i wirte my script bt it has alot of problems!!
quite simply you could convert the two times to unixtime and then:
unixtime_logout - unixtime_login = seconds between login and logout
then you have only to convert the seconds to days/hours/minutes/seconds
--
//Aho
Navigation:
[Reply to this message]
|