以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  年比较  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=129704)

--  作者:xxfoxtable
--  发布时间:2019/1/4 11:08:00
--  年比较
If readbirthday(Sheet(n,3).Value).Year<1898 or readbirthday(Sheet(n,3).Value).Year>Date.year    \'出生年月
                            Sheet(n,18).Value="身份证号码非法"

请教怎么写比较才对



--  作者:有点甜
--  发布时间:2019/1/4 11:13:00
--  

Dim str as string = Sheet(n,3).Value

If str = "" orelse str.length <> 18 orelse str.substring(6,4) < "1898" orelse str.substring(6,4) > cstr(date.today.year) then

[此贴子已经被作者于2019/1/4 11:13:54编辑过]