util.Date可以“yyyy-MM-dd Hh:mm”这样的格式
sql.Date可以接受成“yyyy-mm-dd”格式
有什么办法能完全转换阿。谢谢大家!
sql.Date可以接受成“yyyy-mm-dd”格式
有什么办法能完全转换阿。谢谢大家!
解决方案 »
- 为何我的快速排序如此龟速?
- 大家帮我看一下,万分感谢。错误提示是: Win 中的 run() 无法实现 java.lang.Runnable 中的 run();被覆盖的方法不抛出 java.io.IOException
- 关于<<JAVA编程思想>>,<<JAVA编程语言>>
- java j2ee技术群QQ:20865144
- 终端服务管理
- 关于package的问题,请各位大虾帮忙
- 怎样把字符串放在TextField的右边显示???
- java方法定义问题
- 急!!欢迎大家都来给出出主意(有关java和vrml)
- where I can see all of the questions instead of only hot topics!
- 没分了小弟 请热心人帮忙看下
- 巨难的问题?不知道不人知道吗?有谁知道形参中传递的对象在哪里生成?
System.out.println(now);
int year = now.getYear() ;
int month = now.getMonth() ;
int d = now.getDate();
System.out.println(d);
int h = now.getHours() ;
java.sql.Date sd = new java.sql.Date(year,month,d) ;
System.out.println(new java.sql.Date(date.getTime()));
java.sql.Date sd = new java.sql.Date(now.getTime()) ;
用这个可以的。现在Date都用毫秒来确定的。new Date(毫秒自1700年.....).