detect next day
BlitzMax Forums/BlitzMax Programming/detect next day
| ||
| I am working on a program for work and I want it to save files every day, how would I go about detecting if its a new day? |
| ||
| Check if CurrentDate() <> oldCurrentDate ? |
| ||
| right but what am I doing to assign oldcurrentdate? running a loop or using millisecs? |
| ||
When your app first starts, oldCurrentDate is empty... so you save... otherwise we wait til something exciting happens
Local oldCurrentDate:String
Repeat
If CurrentDate() <> oldCurrentDate Then
oldCurrentDate = CurrentDate()
' Save stuff
End If
' wait a minute
Delay(60000)
Forever
|
| ||
| thanks I will give it a try. |