728x90
Private Function BetweenDate(StartTime As Date, EndTime As Date, CurrentTime As Date) As Boolean
If CurrentTime.Ticks >= StartTime.Ticks And CurrentTime.Ticks <= EndTime.Ticks Then
Return True
End If
Return False
End Function
사용예:)
If Not i.cName Is Nothing Then
ck = BetweenDate(i.sDate, i.eDate, DateTimePicker1.Value)
ck = ck Or BetweenDate(i.sDate, i.eDate, DateTimePicker2.Value)
End If
If ck Then
MsgBox("이미 예약된 시간입니다.")
Return
End If
728x90
'자료' 카테고리의 다른 글
[PHP]$_SERVER기능[접속자와 접속 페이지 관련 정보 반환] - $HTTP_SERVER_VARS (0) | 2020.08.17 |
---|---|
[php] curl을 이용하여 post, get 사용 (0) | 2020.08.17 |
[C#/vb.net] DataGridView 외 컨트롤 제어 (0) | 2020.08.17 |
[C#/vb.net] 수학 함수 (0) | 2020.08.17 |
[C#/vb.net] HTML 정리 및 테그 제거 (0) | 2020.08.17 |