My question is about sqlite dates.
From looking online, I notice sqlite date values are formatted YYYY-MM-DD
depending on the operating system format of the user’s country, the date in xojo will be a different format(like the UK or me (NZ))
I reparsed this by getting the recordset of “started” (which is a date in my database)
a=rs.field(“Started”).StringValue
olddate.Year=val(a.left(4))
olddate.month=val(a.mid(6,2))
olddate.Day=val(a.left(2))
my direct question is this. I’m trying to see if todays date is more than 10 days after the OLDDATE (rs.field(“Started”).StringValue)
did I pull it off with the code below? You may ask me to try it - but my database is online and it’s not yet created.
rs = GraphicBD.SQLSelect("select Started from Identify where PersonID='1'")
dim d as new date
dim a as string
dim olddate as new date
a=rs.field("Started").StringValue
olddate.Year=val(a.left(4))
olddate.month=val(a.mid(6,2))
olddate.Day=val(a.left(2))
olddate.day=olddate.day+10
if d>olddate then
'do some code here
end if