public class Test { public static void main(String[] args) {
Date d = new Date();
d.getDate();
d.getDay();
d.getHours();
d.getMinutes();
d.getMonth();
d.getSeconds();
d.getTime();
}
}
Date d = new Date();
d.getDate();
d.getDay();
d.getHours();
d.getMinutes();
d.getMonth();
d.getSeconds();
d.getTime();
}
}
解决方案 »
- 为什么这个JavaScript动态注入table 在火狐可以显示,在ie不行?(代码已简化)
- 数据查询出错
- 大家研究研究这个问题,google上没有的
- 三级数据库联动下拉框
- 页面刷新的问题
- 我经常看见下面的一些内容,不理解,请各位老大给我解释一下
- 用DriverManager.getConnection连接数据库的问题
- 哪里可以下载com.jspsmart.这个包包呢?在线等待。。。定有重酬
- resin运行servlet的问题
- 愿意奉上所有的分数,请同行们帮帮忙。
- 各们大虾,请问select框中选中某一项后,有什么办法能得到被选中项的index值
- 请教:我现在系统是:eclipse+tomcat5+lomboz,想增加jboss可不可以?怎么做?
cal.setTime(new Date);
cal.get(Calendar.DATE);
cal.get(Calendar.YEAR);
.....
//去掉空格
int inum = date01.indexOf(" ");
String lefts = date01.substring(0,inum); 得到了字符变量 lefts
怎么把他转成日期然后后数据库中的日期进行比较,比较的语句怎么写
String input = "2004-2-1 12:00:05";
System.out.print(input + " parses as ");
Date t;
try
{
t = formatter.parse(input);
System.out.println(t);
}
catch (ParseException e)
{
System.out.println("unparseable using " + formatter);
}