string转换为timestap时间类型

来源:互联网 发布:欧文季后赛数据 编辑:程序博客网 时间:2024/06/12 19:05
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateString = dateFormat.format(new Date());
        System.out.println(dateString);
        Timestamp ts = new Timestamp(System.currentTimeMillis());
        ts =  Timestamp.valueOf(dateString);
0 0
原创粉丝点击