表结勾
card_id身份证号
在mysql中提取18位身份证号码的生日
SELECT CAST(SUBSTRING(card_id,7,8) AS DATETIME),FROM_UNIXTIME(UNIX_TIMESTAMP(CAST(SUBSTRING(card_id,7,8) AS DATETIME)),'%m-%d') AS TIME FROM user
.....
card_id身份证号
在mysql中提取18位身份证号码的生日
SELECT CAST(SUBSTRING(card_id,7,8) AS DATETIME),FROM_UNIXTIME(UNIX_TIMESTAMP(CAST(SUBSTRING(card_id,7,8) AS DATETIME)),'%m-%d') AS TIME FROM user
转载请注明:谷谷点程序 » mysql获取身份证号的生日