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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.