Sub CheckUpdate
DateTime.DateFormat= "dd-MM-yyyy"
Dim today As Long = DateTime.Now
If Not(File.Exists(File.DirInternal,"Update.txt")) Then
'on very first run / install write install date to file
File.WriteString(File.DirInternal, "Update.txt", DateTime.Date(today))
Else
Dim lastDate As Long = DateTime.DateParse(File.ReadString(File.DirInternal,"Update.txt"))
Dim p As Period
p = DateUtils.PeriodBetweenInDays(lastDate,today)
Log(p)
If p.Days > 29 Then
'Do your Update
File.WriteString(File.DirInternal, "Update.txt", DateTime.Date(today)) 'write new date to file
End If
End If
End Sub