Jump to content

Date() Php And Mysql


Recommended Posts

It's best to save the integer timestamp that you get from the time() function. That will return the number of seconds since 1/1/70, so if you want to add 60 days you just add 60 days worth of seconds. A day has 86400 seconds. You can convert the timestamp back to a readable format with the date function, or you can get the timestamp for a specific date with the mktime function.

Link to post
Share on other sites
It's best to save the integer timestamp that you get from the time() function. That will return the number of seconds since 1/1/70, so if you want to add 60 days you just add 60 days worth of seconds. A day has 86400 seconds. You can convert the timestamp back to a readable format with the date function, or you can get the timestamp for a specific date with the mktime function.
thanks, i'll give it a try
Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...