Hello. I am using this code.
2018 01 14 21:30
I calculated the remaining time.
how to count down every week at 21:30 hours.
2018 01 14 21:30
I calculated the remaining time.
how to count down every week at 21:30 hours.
B4X:
EditText1.Text=2018 'years
EditText2.Text=1 ' months
EditText3.Text=14 'days
EditText4.Text=21 'hours
EditText5.Text=30 'minutes
Timer1.Initialize("Timer1", 1000)
Timer1.Enabled = True
target= DateUtils.SetDateAndTime(EditText1.Text,EditText2.Text,EditText3.Text,EditText4.Text,EditText5.Text,00)
******************************************
Sub Timer1_Tick
periode1 = DateUtils.PeriodBetween(DateTime.Now,target)
Label1.Text = periode1.Years & " years " & periode1.Months & " months " & periode1.Days &" days "&CRLF&CRLF & periode1.Hours &" hours "& periode1.Minutes &" minutes "&periode1.Seconds &" seconds"
End Sub