I am trying to insert a row into a table. In that table, the first row is a Timestamp value. Here I am using the UNIQUE_TIMESTAMP() function to insert into the table value and I am getting a -180. Has anybody used this function in the DB2 before? If so, can anybody please tell me how to use this function.
When using this UNIQUE_TIMESTAMP() function in DB2 V8, for some reason the date value in the time stamp is inserted as YYYY/MM/DD instead of the normal DB2 valid value YYYY-MM-DD. So I had to convert the date using some date conversion routine to get the correct results set. Then my -180 is gone and inserted into the DB2 table correctly.
You can also use the following conversion to convert the date into valid format
Name Layout Example
ISO yyyy-mm-dd 2002-10-22
USA mm/dd/yyyy 10/22/2002
EUR dd.mm.yyyy 22.10.2002
JIS yyyy-mm-dd 2002-10-22
LOCAL Locally defined layout N/A