Hi,
I am not sure if my code below is correct or not. I am assuming it's wrong and I think I shouldn't be using a int and need to use long, but when I change it to long it also doesn't work.
I am trying to get the date in xx days based on the current date. In the example below I tried to get the date in 10 days.
I am not 100% sure on how to add 10 days to the current date.
Any ideas on what I have done wrong, or anyone know how to do this ?
I am not sure if my code below is correct or not. I am assuming it's wrong and I think I shouldn't be using a int and need to use long, but when I change it to long it also doesn't work.
I am trying to get the date in xx days based on the current date. In the example below I tried to get the date in 10 days.
I am not 100% sure on how to add 10 days to the current date.
Any ideas on what I have done wrong, or anyone know how to do this ?
B4X:
DateTime.DateFormat = "EEEE DD MMM YYYY"
Dim extra_days As Int
extra_days = DateTime.TicksPerDay * 10 ' ticks per day x 10 days
extra_days = extra_days + DateTime.Now
Log(extra_days) ' logs 1675764148578
Log(DateTime.Date(extra_days)) ' Logs Tuesday 38 Feb 2023