Datepublic Date(String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
Allocates a Date object and initializes it so that it represents the date and time indicated by the string s, which is interpreted as if by the parse(java.lang.String) method.Parameters:s - a string representation of the date.See Also: DateFormat, parse(java.lang.String)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
Allocates a Date object and initializes it so that it represents the date and time indicated by the string s, which is interpreted as if by the parse(java.lang.String) method.Parameters:s - a string representation of the date.See Also: DateFormat, parse(java.lang.String)
解决方案 »
- java web错误 就大神们指点
- Struts2.0+Springframework2.5+ibatis2.3架包
- 异常 'sessionFactory' or 'hibernateTemplate' is required
- 急救Stucts异常
- 启动显示Warning警告, 大家帮忙看看如何解决?
- Commons Digester使用parse时的文件读取问题。
- EXCEL报表,哪位熟悉?
- 我在windows下装了oralcle9i和tomcat而且环境也设好了但是在IE上输入http://127.0.0.1:8080却没有出现tomcat的主页面
- 关于hibernate的一点疑惑?请教!
- 求助:使用jaxp中的dom接口解析xml文件时出现错误(不会迟于5月23日结账)
- JMS是什么东西?
- 开发EJB的工具
Date date=new Date(str);
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
format.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
String dateStr=format.format(date);
System.out.print(dateStr) ;去试试吧,美女!