Jump to content

Days between 2 dates


master82

Recommended Posts

I have a users table and within that I have a field that places the date the member registersd.

What I need is a way to show on a web page the number of (full) days they have been registered for.

I've already connected to the database and pulled out the date, giving it the name $regdate

I know that i need to simply take $regdate from the current date but im left with a long number as this is not formatted, think its the number of seconds they've been a member, rather than days.

Currently using:
[code]$daysold = (date() - $regdate);[/code]
to work this out.

Anyone know how I can
Link to comment
https://forums.phpfreaks.com/topic/5532-days-between-2-dates/
Share on other sites

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.