'===============================================================
'機 能:日付のチェックを行う。(年月日) YYYY,MM,DD
'引 数:int_SW I integer チェックパタン
' 1・・年月日のチェック
' 2・・年月 のチェック
' 3・・年 のチェック
' str_YYYY I String チェック年
' str_MM I String チェック月
' str_DD I String チェック日
'戻り値:True = OK
' :False = NG
'===============================================================
Public Function Chk_Date(ByVal int_SW As Integer, ByVal str_YYYY As String, ByVal str_MM As String, ByVal str_DD As String) As Boolean
Try
Select Case int_SW
Case 1
Dim DateCheck As New Date(str_YYYY, str_MM, str_DD)
Case 2
Dim DateCheck As New Date(str_YYYY, str_MM, "01")
Case 3
Dim DateCheck As New Date(str_YYYY, "01", "01")
End Select
Return True
Catch ex As Exception
Return False
End Try
End Function