Hi
I sorted this out..
I think writing it out loud here made me rethink..
I will leave it here for some else searching later::
===================================================
I want to check every time the app is opened, if its a new day.
The purpose of the app is the user can track points used for the day
However, these need to reset to ZERO at midnight. So I want to have zero used each morning the app is opened.
I have tried writing each entry to a KVS database and also write today
Then on opening, I compare if the CURRENT day is the same as the saved day...
I sorted this out..
I think writing it out loud here made me rethink..
I will leave it here for some else searching later::
B4X:
' Store the LastUpdateTicks
kvs.PutSimple("LastPointsTick", DateTime.Now)
'Get the Ticks store in KVS Datastore
LastPointsTick = kvs.GetSimple("LastPointsTick")
'Do test
Dim myBool As Boolean = DateUtils.IsSameDay(DateTime.Now,LastPointsTick)
===================================================
I want to check every time the app is opened, if its a new day.
The purpose of the app is the user can track points used for the day
However, these need to reset to ZERO at midnight. So I want to have zero used each morning the app is opened.
I have tried writing each entry to a KVS database and also write today
Then on opening, I compare if the CURRENT day is the same as the saved day...
Last edited: