ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¦p¦ó¤ñ¸û ¥Á°ê¤é´Á

¦p¦ó¤ñ¸û ¥Á°ê¤é´Á

¦U¦ì«e½ú¦n,«á¾Ç½Ð±Ð¦U¦ì«e½ú
¦³¤°»ò¤è¦¡¥i¥H§ïµ½¨â­Ó¥Á°ê¤é´ÁÅÞ¿è­È»P´¶³q»{ª¾¤£¦P
EX: 99/4/30 À³¸Ó­n¤p©ó 100/4/30,¥i¬O¥H¤U½d¨ÒÅÞ¿è­È«o¬O False
«á¾Ç¾q¶w
½Ð±Ð¦U¦ì«e½ú:«á¾Ç¥X¤F¤°»ò¿ù»~?«ç»ò¥¿½T¤ñ¸û?

Option Explicit
Sub TEST()
Dim T, T1
T = CDate("99/4/30")
T1 = CDate("100/4/30")
MsgBox T < T1
End Sub

°õ¦æµ²ªG:
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

¦^´_ 2# ­ã´£³¡ªL
¦^´_ 3# Andy2483
¨ü±Ð¤F...·PÁ°ª¤âµL¨pªº©^Äm!!

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-4-27 16:47 ½s¿è

¦^´_ 2# ­ã´£³¡ªL


    ÁÂÁ«e½ú«ü¾É
ÁA¸Ñ¤F,¾Ç²ß¤è®×¦p¤U,½Ð«e½ú¦A«ü¾É

Sub TEST()
Dim T, T1
T = Split("99/4/30", "/"): T(0) = Val(T(0)) + 1911: T = CDate(Join(T))
'ªÅ¥ÕÁä¹j¶}¤]¿ë»{¥X¨Ó¬O¤é´Á,¯u¯«©_
T1 = Split("100/4/30", "/"): T1(0) = Val(T1(0)) + 1911: T1 = CDate(Join(T1))
MsgBox T < T1
End Sub
'°õ¦æµ²ªG¬OTrue

Sub YYY()
MsgBox Format("r" & "100/1/1", "yyyy/mm/dd")
End Sub
'°õ¦æµ²ªG¬O r100/1/1
============================================
¸É¥R:
ÃöÁä¦b+1911

Sub TEST_1()
Dim T, T1
T = "99/4/30": T = (Val(T) + 1911) & Mid(T, InStr(T, "/")): T = CDate(T)
T1 = "100/4/30": T1 = (Val(T1) + 1911) & Mid(T1, InStr(T1, "/")): T1 = CDate(T1)
MsgBox T < T1
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2023-4-27 16:12 ½s¿è

¥Á°ê¤é´Á­n¥ýÂন¦è¤¸, ¤~¯à¤ñ¸û
¤èªk¤@:
split¤À³Î, ¦~+1911, ¦A¦X¨Ö
tr = split("100/1/1","/")
tr(0)= val(tr(0)) + 1911
tt = join(tr, "/")

¤èªk¤G:
Format("r" & "100/1/1", "yyyy/mm/dd")
¦ý¥i¯à¦³¨Çª©¥»¤£¤ä«ù

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD