How to format timestamp in oracle 10g?
Hi – It all depends on how you send the date to Oracle from VB. If you want to use the sysdate, and you always want to use the sysdate as the timestamp when inserting a record, then it is best to make the column in your Oracle table have a DEFAULT value of sysdate and not pass the date to Oracle when inserting the record. By default, if no value is passed to the date field, then on insert it’ll grab the sysdate by default and you don’t have to worry about it. As an example, say you have table TEST with 3 columns: SQL> create table test (x number, y timestamp default sysdate, z varchar2(12)); Table created. SQL> insert into test (x,z) values (1,’hello’); 1 row created. SQL> commit; Commit complete. SQL> select * from test; X Y Z ———- —————————————-… ———— 1 12-MAR-08 09.09.18.000000 PM hello Or you can explicitly enter sysdate as a value: SQL> insert into test (x,y,z) values (1,sysdate,’hello again’); 1 row created. SQL> commit; Commit complete. SQ