0 Replies Latest reply on May 25, 2010 6:59 PM by iamcootis

    Using dates with SQLite and AIR

    iamcootis Level 1

      Currently I am placing my date values into an SQLite database TEXT column like this:

      var date:Date = new Date();
      stmtInsertIntoUserWordRelTable.parameters[":date"] = date.toString();

       

      And I retrieve them from the database as a string that looks like this: "WED May 19 23:50:44 GMT-0500 2010"

       

      I began my program doing it this way because this date was part of an object and I wanted to use the itemClass when retrieving it from the database and this was the only way I could make it happen.

       

      Now, I have no way of converting this string to a date to do date calculations. There has to be a better way to save a date in an SQLite database and to retrieve it. Has anyone ever done this?