在DB2里有没有象Oracle里的sysdate函数或象SQL SERVER里的getdate()函数.
---------------------------------------------------------------
有的:current date, current time等等,很多的,看一下资料。
试一下:
select current date from table1
---------------------------------------------------------------
设计库时,将列表设为:timestamp;
取时间:String time=rs.getString("defidatetype");
String date=time.substring(0,9);
---------------------------------------------------------------
DB2中,此类信息一般放在其所谓的寄存器里,如当前时间戳:
CURRENT TIMESTAMP
直接指定上面的语句即可取得当前时间,不需要使用函数