Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Java SE 综合讨论区
打印话题 寄给朋友 订阅主题 |
作者 | Re:java.sql.date 的日期计算问题 [Re:jerry010] |
why
問題兒童 总版主 发贴: 4629 积分: 388 |
于 2004-09-06 08:28
java.sql.Date(date.getYear(),date.getMonth()+1,date.getDate()) you don't have to add 1 to date,getMonth() since both java.sql.Date(int,int,int) and java.util.Date(int,int,int) expects the month value from 0 to 11 check http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Date.html#Date(int,%20int,%20int) and http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html#Date(int,%20int,%20int)
why edited on 2004-09-06 08:30
|
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |