VB.NET校驗(yàn)字符串是否是日期
1
2
3
4
5
6
7
8
9 |
'Validate for a date Shared Function checkdate( ByVal thisvalue As String ) As String If Not IsDate(thisvalue) Then checkdate = "NULL" Else checkdate = "'" & thisvalue & "'" End If Return checkdate End Function ' END checkdate |
VB.NET檢查字符串是否是數(shù)字
1
2
3
4
5
6
7
8
9
10
11
12 |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'Used to submit values to the database, check for empty value, replace w/ "NULL" '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shared Function checkNumber( ByVal thisvalue As String ) As String If IsDBNull(thisvalue) Or Len(thisvalue) = 0 Or Not IsNumeric(thisvalue) Then checkNumber = "NULL" Else checkNumber = thisvalue End If Return checkNumber End Function ' END checkNumber |
以上所述就是本文的全部?jī)?nèi)容了,希望大家能夠喜歡。
![]() | ![]() .. 定價(jià):¥225 優(yōu)惠價(jià):¥213 更多書(shū)籍 |
![]() | ![]() .. 定價(jià):¥133 優(yōu)惠價(jià):¥133.0 更多書(shū)籍 |