首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

时间格式转入毫秒

2012-09-29 
时间格式转为毫秒?sbSql.append( select createdate + ( select period/1000/3600/24 from mass_app_peri

时间格式转为毫秒

?

sbSql.append(" select createdate + ( select period/1000/3600/24 from mass_app_period p where version=? ").append(" ) odate from cdml_sensky_user@ORA72_101_WAPLAT.US.ORACLE.COM where id=? ")

long olddate = rs.getTimestamp("odate").getTime(); long currentDate = System.currentTimeMillis();//当前时间

?

import java.text.ParseException;import java.text.SimpleDateFormat;public class Cat {public static void main(String[] args) throws ParseException {String str = "201104141302";SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmm");long millionSeconds = sdf.parse(str).getTime();//毫秒System.out.println(millionSeconds);}}

热点排行