SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
reportDate = dateFormat.parse("2005-1-1");
int v_year=reportDate.getYear(); //该方法不能使用,被划了横线???
reportDate = dateFormat.parse("2005-1-1");
int v_year=reportDate.getYear(); //该方法不能使用,被划了横线???
解决方案 »
- jsp页面中动态获取数据保存的问题,,,,,js动态传值给java片,,
- Spring MVC报错了,求解。。。
- 经验贴:和大家探讨数据库表结构的设计经验,请高手不吝赐教!
- 关于AJAX做select联动的问题
- 安装Tomcat 6.0时出现如下提示,怎么回事????
- 高手帮我看看
- webwork 如何把action 中的友好提示输出到页面上
- Struts下如何在JSP中调用数据库查询的结果?
- 时间格式的比较问题,会者不难,大家来帮忙啊
- 请高手指点:quest对象和session对象的是用方法,最好有例子说明。(UP有分)
- 看看这个JSP与SQL连接..怎么不行呢?
- 为了生活---高分求救!!
用Calendar吧.
Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.get(Calendar.YEAR);
cal.get(Calendar.MONTH);
......