IdentityNumber 是身份证号 年龄: ,), GETDATE()) / 365.25) as '推荐人年龄', 15位的身份证计算年龄: case when b.IdentityNumber IS null or b.IdentityNumber='' then '' ,), )) ,), )) else '' end as '推荐人年龄', 性别: ,) ) ) ) then '男' ,) ) ) ) then '女' else '' end as '推荐人性别',
DATE 用途:返回代表特定日期的序列号. 语法:DATE(year,month,day) 参数:year 为一到四位,根据使用的日期系统解释该参 数.默认情况下,Excel for Windows 使用 1900 日期系统, 而 Excel for Macintosh 使用 1904 日期系统.Month 代表每 年中月份的数字.如果所输入的月份大于 12,将从指定年份 的一月份执行加法运算.Day 代表在该月份中第几天的数字. 如果 day 大于该月份的最大天数时,将从指定月份的第一天 开始
用vba做一个事件驱动程序. 第一步:点击开发工具-visual basic. 第二步:在当前工作表中编制程序如下: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Then Target.Value = Now End If End Sub
SELECT *, Age= datediff(yy,cast(case when substring(PersonalId,,) ') /*若第7位不是'1'或'2'则表示是15位身份证编码规则*/ then substring(PersonalId,,) ,) end as datetime),getdate()) FROM Student WHERE datediff(yy,cast(case when substring(PersonalId,,) ') then substring(P
select case left(idcard,2) when '11' then '北京市'when '12' then '天津市'when '13' then '河北省'when '14' then '山西省'when '15' then '内蒙古自治区'when '21' then '辽宁省'when '22' then '吉林省'when '23' then '黑龙江省'when '31' then '上海市'when '32' then '江苏省'when '33' then '浙江
elect case left(idcard,2) when '11' then '北京市' when '12' then '天津市' when '13' then '河北省' when '14' then '山西省' when '15' then '内蒙古自治区' when '21' then '辽宁省' when '22' then '吉林省' when '23' then '黑龙江省' when '31' then '上海市' when '32' then '江苏省' when '33