first_lady_the_queen Posted March 23, 2003 Share Posted March 23, 2003 hi i hope someone can help.. i got the following db table create table project ( projectnr int not null unique, description varchar(100)not null, start date not null, end date not null, belongs int not null, lnkontakt varchar(50) not null, fnkontakt varchar(50) not null, mkontakt varchar(50) not null, status int not null, primary key (projectnr) ); then i like to add values... now how can i set the end time? i tried now()+100 but doesnt work. insert into project values (1,Projektbeschrieb, now(), now()+xx , Zugehörigkeit (Projekt), Konatk Nachname, Kontakt Vorname, Kontakt Mail, Projektstatus); many thx[/code] Quote Link to comment Share on other sites More sharing options...
pallevillesen Posted March 24, 2003 Share Posted March 24, 2003 The format of the date type is \"YYYY-MM-DD\" So instead of using now(), use DATE_ADD(CURRENT_DATE(), INTERVAL 100 DAY) For getting the current date, add 100 days to it and return it in the correct date format \"yyyy-mm-dd\" Not to be annoying, but read the docs at http://www.mysql.com/doc/en/Date_and_time_..._functions.html P. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.