Re: Inserting into a date field.
Posted in 1997
Carlos Antonio Ruiz Gomez — — source: Informix-list mailing list archive (1991-1998)
> I am trying to insert data into a date field and I have not been able to
> figure out the correct string for inserting 10/01/97. I have tried
> 100197 and when I do a select it comes out at July 15, 4558. I can today
> and it puts in today date correctly. Does anyone have a solution.
To make the code independent of DBDATE environment variable,
(this variable can be set by the user in another format that
when I wrote the program), I try to use always something like
that:
let date_var = mdy(10,1,1997)
insert into table (date_field) values (date_var)
-------------------------
Carlos Antonio Ruiz G'mez
dmys2@colomsat.net.co
Santaf' de Bogot' D. C.
Colombia, Suram'rica