Jump to content

if datetime within a year of current time


webguy262

Recommended Posts

I need an if statement that works like this...

 

if the datetime in the database is less than a year earlier than the current date

 

account is good;

 

else

 

your account has expired.

 

I suspect it is something like...

 

if (curtime() - $datetime_in_dbase <= 365 days) {

 

ok

 

} else {

 

not ok }

 

Can't seem to find exactly how to code it.

 

Suggestions?

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.