Excel 身份证 男女
=IF(MOD(MID(A1,17,1),2),"男","女")
[附件下载]
C#2022/7/17 18:23:01
        public static string GetGenderByIdCard(string idCard)
        {
            int x=Convert.ToInt16(idCard.Substring(16, 1));
            if( x % 2== 0)
            {
                return "女";
            }else{
                return "男";
            }
        }
访客: