将出生日期转化为活了多少天的算法

double salary111 = Double.valueOf(salary);
        System.out.print(J.parseNumToZh(salary111));
        String money = J.parseNumToZh(salary111);
        System.out.print(money);
       
            Date birthDay = sdf.parse(birth11);
            Date nowdate = new Date();// 现在的时间用于计算现在的年纪
            long diff = nowdate.getTime() - birthDay.getTime();
            long days = diff / (1000 * 60 * 60 * 24);
          //  System.out.println("我已经活了" + days + "天了!");

你可能感兴趣的:(oracle数据库,java)