It's a simple question (not enough simple for me it seem)
I want to change WelcomLabels text between a few time stamps, like this:
But it's not working, because I don't know how to write it properly... Can anyone correct me?
I want to change WelcomLabels text between a few time stamps, like this:
B4X:
DateTime.TimeFormat = "HH:mm"
Log(DateTime.Time(DateTime.Now))
If DateTime.now > DateTime.TimeParse("05:00") AND DateTime.Now < DateTime.TimeParse("09:59") Then
WelcomeLabel.Text = "Morgon"
Else If DateTime.Now > DateTime.TimeParse("10:00") AND DateTime.Now < DateTime.TimeParse("17:59") Then
WelcomeLabel.Text = "Dag"
Else If DateTime.Now > DateTime.TimeParse("18:00") AND DateTime.Now < DateTime.TimeParse("21:59") Then
WelcomeLabel.Text = "Kväll"
Else If DateTime.Now > DateTime.TimeParse("22:00") AND DateTime.Now < DateTime.TimeParse("04:59") Then
WelcomeLabel.Text = "Natt"
End If