Hi,
I have a strange behaviour, I cannot explain. I use a button Up and a button Down to increase/decrease the date with one day:
Suddenly it seems stuck on 25-10-2020. I can decrease, but not increase. Starting on 26-10-2020 I can increase. Decrease before 25-10-2020, it still get stuck on 25-10-2020.
Does this somethingto do with winter/summer time?
I am in the Netherlands (+2).
Attached you will find a small example.
Is there somthing I do wrong? Can someone have look and tell me what to do?
Thanks,
BR, André
I have a strange behaviour, I cannot explain. I use a button Up and a button Down to increase/decrease the date with one day:
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
Dim DisplayDatum As String
Private edtDate As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
DateTime.DateFormat="dd-MM-yyyy"
DisplayDatum=DateTime.Date(DateTime.Now)
edtDate.Text=DisplayDatum
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnDDmin_Click
DisplayDatum=DateTime.Date(DateTime.DateParse(DisplayDatum)-DateTime.TicksPerDay*1)
edtDate.Text=DisplayDatum
End Sub
Sub btnDDplus_Click
DisplayDatum=DateTime.Date(DateTime.DateParse(DisplayDatum)+DateTime.TicksPerDay*1)
edtDate.Text=DisplayDatum
End Sub
Suddenly it seems stuck on 25-10-2020. I can decrease, but not increase. Starting on 26-10-2020 I can increase. Decrease before 25-10-2020, it still get stuck on 25-10-2020.
Does this somethingto do with winter/summer time?
I am in the Netherlands (+2).
Attached you will find a small example.
Is there somthing I do wrong? Can someone have look and tell me what to do?
Thanks,
BR, André