Hi Guys,
I need to save and retrieve dates in a SQLite Database.
Im saving the dates lige this:
var mydate = "STRFTIME('%J','"+year+"-"+month+"-"+day+"')"
sqlquery("INSERT INTO gamedata ( leftTime, number, totalTime, usedTime, theDate)" + "VALUES ('"+setValueMaxSpendPerDay+"', '1', '"+setValueMaxSpendPerDay+"', '0', "+mydate+")");
Which seem to be working.
How ever when i need to select a specific date at a later stage im not having any luck :-/
Im trying this:
var day | = "01"; |
var month | = "06"; |
var year | = "2014"; |
var mydate = "STRFTIME('%J','"+year+"-"+month+"-"+day+"')"
sqlquery("SELECT * FROM gamedata WHERE theDate == "+mydate);
I have also tried:
sqlquery("SELECT * FROM gamedata WHERE theDate == "+"'2014-06-01'");
But without any luck :-/
Any help is greatly appriciated.
Thanx in advance
Henry