Jump to content

[SOLVED] effective due date? timestamp? FATAL error.


kr3m3r

Recommended Posts

Hi, I'm building a library with php, and want to create a way for the return date for an item to automatically be 14 days after they are checked out.

I had hoped to use something like:

$Check_Out_Date=TIMESTAMP[(];

and then manipulate that with substrings and whatnot, until i could put it back together as 2 weeks later.  Unfortunately I'm getting a FATAL error, with this.  Any recommendations would be really appreciated.

Thanks for your time,

-Robb

Link to comment
Share on other sites

Well, the book I'm using said there was a timestamp()function, but I can't seem to find more on it.

Now I'm trying to use date and the result I'm getting is:

Warning: Wrong parameter count for date() in /home/.titch/rwkremer/kr3m3r.com/Sub_Check_Out.php on line 105

from the code:

echo date();

 

I'm really just hoping to find a way to create a due date of 14 days from the date of check out.

Thanks again for the help.

-Robb

Link to comment
Share on other sites

Well, the book I'm using said there was a timestamp()function, but I can't seem to find more on it.

Now I'm trying to use date and the result I'm getting is:

Warning: Wrong parameter count for date() in /home/.titch/rwkremer/kr3m3r.com/Sub_Check_Out.php on line 105

from the code:

echo date();

 

I'm really just hoping to find a way to create a due date of 14 days from the date of check out.

Thanks again for the help.

-Robb

 

Aye, the date function requires parameters, look it up on php.net.  So, you need the date + 14 days applied to a variable that can be saved?

 

Ok


$newdate = date('d') + 14 . ' ' . date('m y');
echo $newdate;

 

Hmm ,but that doesn't move it into the next month.. so I guess you could do and if on the result you get from simply adding 14 to the day number of the month? but then you'd have to index all the days in each month.. ill keep working on this for you

 

The timestamp function, that regards the unix epoch time is time();

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.