数据库字段 dateline int (发布时间) 值是 1268053581
Java code:
for(int i=0;i<array_polls.size();i++)
{
Polls polls=(Polls)array_polls.get(i);
Threads threads = (Threads)pollotionDaoImpl.findPostsByid(polls.getTid());
long starttime=threads.getDateline()/1000;
long endtime= System.currentTimeMillis();
String runTime=Common.number_format((endtime-starttime)/1000f, "0.000000");
System.out.println("starttiem: "+starttime);
System.out.println("endtime: "+endtime);
System.out.println("runTime: "+runTime);
System.out.println("数据库时间"+Math.abs(threads.getDateline()/1000));
// System.out.println( Common.toDigit(String.valueOf(threads.getDateline()))*3600);
arry_threads.add(threads);
}
输出语句
starttiem: 1268053
endtime: 1268104946062
runTime: 1268103680.000000
数据库时间: 14676
要怎么样转换呀??
怎么从毫秒数转回来呀???
Date start = new Date(starttime*1000)
在安装Java编译器的Eclipse的时候,对环境变量进行了配置,在安装MySQl的时候也要对环境变量进行配置;那么后面的配置会影响前面的Eclipse的配置吗?
请大家多指教~!谢谢!
不会把,我这都装了的 我系统里 还装了 ......
我对SQL SERVER和ACCESS比较熟,所以数据库的通用基础东西可以说都掌握的差不多了,我现在想要的就是以上两数据库的独特之处的介绍和应用介绍。
另外书最好对应最新版本 oracle是11g吧 10的也行;mysql是5.1吧
谢 ......