Jump to content

Calculating the difference between two dates


MortimerJazz

Recommended Posts

Hi there,

I'm trying to calculate the time since a registered user last logged into a website.

I have two variables:

$last_login (timestamp from DB showing the last time a particular user logged in)
now() - Timestamp showing current time/date

I've tried subtracting one from the other, but I'm not getting the result that I needed.

Can anyone help me at all?

Thanks,

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.