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 troubles to write that into a > dabasefield that was set to datetype. > > Regards, > Ruprecht You don't say what format the date is presented, but you could probably look at doing the calculation with mysql's DATE_ADD; see http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html for more information. Cheers -- David Robley Don't be a sexist, broads hate that. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php