[PHP-DB] inserting due date into database

2006-01-04 Thread Ruprecht Helms
Hi, how can I calculate the due date from the date of an invoice and insert the result into a mysql-database. The daydifference is 14 days. Actualy I have tried something with mktimes, but I only get the timestamp of the due date. I have troubles to write that into a dabasefield that was set

Re: [PHP-DB] inserting due date into database

2006-01-04 Thread David Robley
On Wed, 4 Jan 2006 07:37, Ruprecht Helms wrote: Hi, how can I calculate the due date from the date of an invoice and insert the result into a mysql-database. The daydifference is 14 days. Actualy I have tried something with mktimes, but I only get the timestamp of the due date. I have

Re: [PHP-DB] inserting due date into database

2006-01-04 Thread Amos Glenn
php.net says: date ( string format [, int timestamp] ) To turn a php timestamp into something that will be recognized by the mysql DATE type, you might try this: ?php $due_date= //however you set up you invoice+14days timestamp $mysql_date = date(Y-m-d,$due_date);// makes a string like

Re: [PHP-DB] inserting due date into database

2006-01-04 Thread Miles Thompson
At 08:34 AM 1/4/2006, Amos Glenn wrote: php.net says: date ( string format [, int timestamp] ) To turn a php timestamp into something that will be recognized by the mysql DATE type, you might try this: ?php $due_date= //however you set up you invoice+14days timestamp $mysql_date =