public static String getAgeTxt(String birthTime,String beginTime,int level){ if(StringUtils.isBlank(birthTime)||StringUtils.isBlank(beginTime)){ System.out.println("参数中有空值!"); } int year = 0,month=0,day=0,hour=0; Date birthDate = getDateByString
<script type="text/javascript"> //jquery页面加载完成后,根据后端的出生日期,计算年龄 $(function () { // 获得今天的时间 var date = new Date(); var birthday = '${userDetail.birthday}'; // alert(birthday); var startDate = new Date(birthday); var newDate = date.getTime()
import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * Created by qing on 2017/3/28. */ public class AgeUtils { // 根据年月日计算年龄,birthTimeString:"1994-11-14" public static int getAgeFromBirthTime(String birthTimeS
IdentityNumber 是身份证号 年龄: ,), GETDATE()) / 365.25) as '推荐人年龄', 15位的身份证计算年龄: case when b.IdentityNumber IS null or b.IdentityNumber='' then '' ,), )) ,), )) else '' end as '推荐人年龄', 性别: ,) ) ) ) then '男' ,) ) ) ) then '女' else '' end as '推荐人性别',