public Date(long date) Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT. 把字符串转换成long,先用parseLong(String s) 再用Date(long date)。
在SQL语名中添加记录时 insert into 表 (字段1)values(to_date('"+asdf+ "','yyyy-mm-dd')" )
Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
把字符串转换成long,先用parseLong(String s)
再用Date(long date)。
insert into 表 (字段1)values(to_date('"+asdf+ "','yyyy-mm-dd')" )