Android Question Button to EditText

leemizu

Member
Hallo everyone
Can when we click the button it will appear in edittext?
and can the msgbox be displayed in Edittext?

thank you
leemizu
 

leemizu

Member
What will appear in the EditText?
what will appear in the edit text is the answer from the msgbox, is that possible? thank you


How can a Msgbox appear inside the EditText?
Actually I don't understand either, that's why I asked
If you can't, no problem, I'm just asking
thank you
already answered
 
Upvote 0

leemizu

Member
hallo evryone can you help me,
why if it is clicked it always comes out "You late" ?
what is problem ? I don't know


now = DateTime.Now
Lbldate.Text = DateTime.Date(now)
DateTime.DateFormat = "MMM:dd:yyyy" '29:08:2020
DateTime.TimeFormat = "HH:ss:mm" ' 09:00:00
If DateTime.time (now)= "09:30:00" Then
Msgbox ( "you the fisrt time","")
Else if DateTime.Time(now) ="00:00:00 < 09:00:00" Then
Msgbox("you're very diligent","")
Else
Msgbox("you late","")
End If
please help me
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
why if it is clicked it always comes out "You late" ?
Because you are comparing the string "08:32:00" (example result of DateTime.Time(now)) with the String "00:00:00 < 09:00:00 ". It will NEVER be the same....

You should create two long values for the min and max time and compare these values.
 
Last edited:
Upvote 0

leemizu

Member
Because you are comparing the string "08:32:00" (example result of DateTime.Time(now)) with the String "00:00:00 < 09:00:00 ". It will NEVER be the same....

You should create two long values for the min and max time and compare these values.

Can you give an example ??
 
Upvote 0
Top