java中有没有办法获取int型的时间戳,因为之前数据库里是设计成integer的,实体类里也是integer的,所以改起来不方便。只好用int的时间戳
而new Date().getTime()、Calendar.getInstance().getTimeInMillis()、System.currentTimeMillis()这三种获取的都是long类型的,有办法获取整型的吗?
java中有没有办法获取int型的时间戳,因为之前数据库里是设计成integer的,实体类里也是integer的,所以改起来不方便。只好用int的时间戳
而new Date().getTime()、Calendar.getInstance().getTimeInMillis()、System.currentTimeMillis()这三种获取的都是long类型的,有办法获取整型的吗?
4 回答970 阅读
4 回答886 阅读
586 阅读
492 阅读
不方便也要改,如果要存毫秒级时间戳,必须要使用
long,int不够用。