I'm trying to see if the current time is equal or greater than a value stored in a label view text property.
Thanks.
B4X:
Sub TheTimeIsInTheSilentPeriods() As Boolean
Dim blnReturnValue As Boolean = False
Dim lngTicksNow As Long = DateTime.Now
Dim lngTicksStartTime As Long = DateTime.TimeParse(strSilentPeriod1Start)
If lngTicksNow => lngTicksStartTime Then
ToastMessageShow("The time is part of the silent period.", False)
End If
Return blnReturnValue
End Sub
Could you show a code sample? My code gives a Java error when I try to compile it. Looks like the error is at the If statement.
When the code is working, I will be using strSilentPeriod1Start, strSilentPeriod1End, strSilentPeriod2Start, strSilentPeriod2End. There will be a total of 5 starting and ending silent periods to be tested against the current time.