I`m having a little trouble displaying future dates...
| From: | Trond Erling Hundal | Date: | Wed, 11 Oct 2000 10:30:16 +0000 |
| Subject: | I`m having a little trouble displaying future dates... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3516@lists.php.net to get a copy of this message | ||
I`m woriking with a db of articles for a news-site, and the reporters want
to be able to manipulate the dates to store as todays-date + 1-7 day(s).
This way they can write articles in the weekend and holidays, and they won`t
be published until it`s a normal work-day again...
They also want the time to be exactly 07:00:00.
At first i used ADD_DATE(NOW(), INTERVAL 1 DAY), but this ment that if they
wrote the article on an saturday evening at, say 18:35, the article wasn`t
published until 18:35 in the evening (on the desired date)
In the form where they write their articles and select the date, I have now
tried this:
<SELECT name=\"date\">
<option value=\"DATE_ADD(CURRENT_DATE(), INTERVAL 1 DAY)\">Todays date + 1
day</option>
etc through 7...
And in the input script i had: {$date = "$date 07:00:00" ;} before I toss it
into the MySQL table.
But it only stores as 0000-00-00 00:00:00. I suppose it has something to do
with my format.
How can I solve this?