Jump to content

how to get a future date after 180 days after present day


afsar

Recommended Posts

hi friends i would like to create a application where i am storing present date. and also want to mention expiration date 180 days from present day, how to do it using php, i am using mysql as my database.

please kindly help me

Link to comment
Share on other sites

hi friends i would like to create a application where i am storing present date. and also want to mention expiration date 180 days from present day, how to do it using php, i am using mysql as my database.

please kindly help me

 

I'm trying to fully understand this. If you are referencing the expiration date as 180 days from the present date, the account with never expire. If you are defining the signup date as the current date at time of signup and an expiration date at the same time, you'll just need to do something like this:

INSERT INTO myTable (signup_date, exp_date) VALUES (NOW(), NOW() + INTERVAL 180 DAY);

 

Hope this helps.

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.