나는 다음과 같은 코드를 가지고 : 나는 FormatException을 받고 있던 주석 섹션에'01/25/1955 '문자열에서 datetime을 가져 오는 방법은 무엇입니까?
Dim dtDoM As Nullable(Of DateTime)
If (txtMarriageDate.Text.Trim = "") Then
dtDoM = Nothing
Else
dtDoM = DateTime.ParseExact(txtMarriageDate.Text.Trim + " 00:00:00", "dd/MM/yyyy hh:mm:ss", System.Globalization.CultureInfo.InvariantCulture)
'dtDoM = Convert.ToDateTime(txtMarriageDate.Text)
End If
나는 "System.FormatException = {"날짜 시간이 표시지고있어 새로운 코드에 '문자열을 날짜로 인식되지를' 문자열에 의해 System.Globalization.GregorianCalendar 달력에서 지원되지 않습니다. "}"
편집 : 답변 됨. 내가 그것을 간과했다라고 생각할 수 없다.
오 마이. 나는 다른 사람들과 일하는 것이 싫다. 내가 그걸 알아 차리지 못했다니 믿을 수가 없어. – tsdexter