Re: [Q] Getting default value into DATETIME column
Posted in 1997
}From: "titan" <ian@kam.com> }Date: 7 Feb 1997 10:50:15 GMT }X-Informix-List-Id: <news.33594> } }Environment: RS6k F40, AIX 4.1.5, Informix SE 7.1 using Db-access. } }Hi, } }Can anyone suggest why the following code doesn't work as expected ? The }default value (as I see it) should contain the exact time (to the second }anyway) but actually shows 00:00. I've checked the FAQs and _have_ RTFM and }have found nothing to suggest that it should fail. The code was not }executed at midnight, BTW :-) } }<input> }create table activitylog }( } actid serial, } acttask int, } acttime datetime year to second default current year to second, } actstaff int }); }insert into activitylog(acttask,actstaff) values(19,1); }select * from activitylog; }<output> } actid actstaff acttime acttask } } 1 1 1997-02-07 00:00:00 19 On Solaris 2.5.1 with OnLine 7.21.UC1, I get what both you and I would expect to get, though I note that the column sequence is different from what you quote: actid acttask acttime actstaff 1 19 1997-02-07 09:26:07 1 This suggests that there is a bug in the version you are using... Contact your technical support people. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>