Dim time As String = TimeOfDay.ToString("tt")
Dim time2 As Integer = TimeOfDay.ToString("hh:mm:ss")
If time = ("du.") Then
timehre = (time2 + 12)
Debug.WriteLine("munkaidoben")
Else
Debug.Write("munkaidoben = false")
timehre = time
End If
For munkaido As Integer = 13 To 19
If time2.ToString.Contains(munkaido) Then
duplaar = False
Else
duplaar = True
End If
Next
Timehre已經被聲明爲integrer.So,我想要什麼,以獲得UTC + 1的時間,如果時間在13:00範圍 - 19:00然後返回一個真正的布爾值,如果它不在13:00 - 19:00範圍內,則返回一個假的布爾值。檢查的TimeOfDay是在規定的範圍內
P.s.對不起英文不好,我希望你能夠解釋我的問題。
我搜索某個字符串,因爲我不知道如何將timeofday轉換爲utc + 1時間。 –