Viktor Künstler
Viktor Künstler

Reputation: 309

Informix - Insert into column datetime year to second

I use the informix database. I need to insert the current date with current time into a column with the column type "datetime year to second".

Example:

INSERT INTO example_table (my_example_date) VALUES( ??? );

How does it work?

Upvotes: 1

Views: 863

Answers (1)

csoeger
csoeger

Reputation: 86

current is what you want to use, here a full working example I tested:

create table example_table (my_example_date datetime year to second);
INSERT INTO example_table (my_example_date) VALUES( current );
select * from example_table;

gives:

2023-02-10 09:21:00.000

Upvotes: 1

Related Questions