P parpatola Member May 13, 2023 #1 Ho everyone, Simeone can explain me why the date 29/10/2023 (only that date) repeats itself? Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Private xui As XUI End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. Private ListView1 As ListView End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("Layout") Dim i As Int DateTime.DateFormat="MM/dd/yyyy" ListView1.Color=Colors.Black For i=0 To 10 ListView1.AddSingleLine(DateTime.Date(DateTime.DateParse("10/28/2023")+i*DateTime.TicksPerDay)) Next End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub Button1_Click End Sub Attachments Screenshot_20230513-180420.png 63.3 KB · Views: 452
Ho everyone, Simeone can explain me why the date 29/10/2023 (only that date) repeats itself? Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Private xui As XUI End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. Private ListView1 As ListView End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("Layout") Dim i As Int DateTime.DateFormat="MM/dd/yyyy" ListView1.Color=Colors.Black For i=0 To 10 ListView1.AddSingleLine(DateTime.Date(DateTime.DateParse("10/28/2023")+i*DateTime.TicksPerDay)) Next End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub Button1_Click End Sub
DonManfred Expert Licensed User Longtime User May 14, 2023 #2 Please use code tags when posting code! Upvote 0
Sagenut Expert Licensed User Longtime User May 14, 2023 #3 I just used your code and it does not happen to me. Attachments date.jpg 24.6 KB · Views: 478 Upvote 0
R RJB Active Member Licensed User Longtime User May 14, 2023 #4 last Sunday in October - daylight saving + one hour in the day? Upvote 0
M Mahares Expert Licensed User Longtime User May 14, 2023 #5 parpatola said: Simeone can explain me why the date 29/10/2023 (only that date) repeats itself? Click to expand... I tried your code also and it ran as expected. I came up with the same result as Sagenut. If you continue to have problems, try using the Add function like this: Code: Copy ListView1.AddSingleLine( DateTime.Date(DateTime.Add(DateTime.DateParse("10/28/2023"),0,0,i))) Last edited: May 14, 2023 Upvote 0
parpatola said: Simeone can explain me why the date 29/10/2023 (only that date) repeats itself? Click to expand... I tried your code also and it ran as expected. I came up with the same result as Sagenut. If you continue to have problems, try using the Add function like this: Code: Copy ListView1.AddSingleLine( DateTime.Date(DateTime.Add(DateTime.DateParse("10/28/2023"),0,0,i)))
P parpatola Member May 17, 2023 #6 Mahares said: I tried your code also and it ran as expected. I came up with the same result as Sagenut. If you continue to have problems, try using the Add function like this: Code: Copy ListView1.AddSingleLine( DateTime.Date(DateTime.Add(DateTime.DateParse("10/28/2023"),0,0,i))) Click to expand... ok, with datetime.add works fine, thanks. i have tried the other code with 2 different pc on 2 different smartphone and don't work, i don't know why. I'm italian , i used that code in a scrollview to calculate turn at work. scrolling the view my code works fine until the date was 10/29/2023 (i used 29/10/2023 according to data format "dd/MM/yyyy") Upvote 0
Mahares said: I tried your code also and it ran as expected. I came up with the same result as Sagenut. If you continue to have problems, try using the Add function like this: Code: Copy ListView1.AddSingleLine( DateTime.Date(DateTime.Add(DateTime.DateParse("10/28/2023"),0,0,i))) Click to expand... ok, with datetime.add works fine, thanks. i have tried the other code with 2 different pc on 2 different smartphone and don't work, i don't know why. I'm italian , i used that code in a scrollview to calculate turn at work. scrolling the view my code works fine until the date was 10/29/2023 (i used 29/10/2023 according to data format "dd/MM/yyyy")
P parpatola Member May 17, 2023 #7 Sagenut said: I just used your code and it does not happen to me. Click to expand... can you try to start at 10/27/2023 please? Upvote 0
Sagenut said: I just used your code and it does not happen to me. Click to expand... can you try to start at 10/27/2023 please?
P parpatola Member May 17, 2023 #8 DonManfred said: Please use code tags when posting code! Click to expand... ok, sorry. Upvote 0