您好,请您先 登陆 或者 注册

如何在前台套打印会员生日?

例如 :几岁?

问题补充:不满一岁的显示几个月?

提问者: 别怀远
等级:普通会员
时间:2018-10-29 12:26
悬赏:0
解决时间:2018-11-08 12:26
回答 共 2 条
你好,问题描述不是很清楚,请加技术部的qq:4008315218,详细说明
回答者:赢通技术4
等级:钻石会员
时间:2018-10-29 14:20
你好:根据会员阳历生日和当天日期计算出会员年龄,不满一年的显示为月。函数如下:
if (integer(left(string(today()),4))-integer(db_data2(~"select vip_birth_year from t_vip_info where vip_no=?~",vip_no))>0,string( integer(left(string(today()),4))-integer(db_data2(~"select vip_birth_year from t_vip_info where vip_no=?~",vip_no)))+~"岁~",string(integer(db_data2(~"select datediff(month, CONVERT (datetime,cast(vip_birth_year as varchar(4))+right(cast(0 as varchar(1))+cast(vip_birth_month as varchar(2)),2)+right(cast(0 as varchar(1))+cast(vip_birth_day as varchar(2)),2),23),getdate()) from t_vip_info where vip_no=?~",vip_no)))+~"月~" )
回答者:ytkf007
等级:问不倒翁
时间:2018-10-29 17:26
快到期问题
总积分排行
ytkf00720058 4704
kh35927124 3414
赢通技术43602 3117
bonchen13219 2797
赢通技术37615 2590
JCLH11087 1917
浅逝1873 1873
李祥19958 1542
xiaobird3309 1254
daoptt3310 1237