SQLite data definitions (req'd fields?)
Question asked by Greg Corwin - August 15, 2016 at 10:52 AM
We are looking to automate the updating of mailing list subscribers by inserting them in the SQLite db using a powershell script.  Inserting them isn't a big deal, but what I am confused by are the some fields in the Subscribers and MailingListSubscribers tables.  There are CreatedOn and EditedOn and BounceAddress in Subscribers, and SubscribedOn in MailingListSubscribers.  The date fields are a timestamp of some sort, but they are not Epoch Time.  
My question: are these fields required and if so what is the format I should be using?
TIA - Greg

1 Reply

Reply to Thread
Matt Petty Replied
Employee Post
They appear to be using DateTime format.
Snippet of code that lead me to this.
            toSave.EditedOn = DateTime.UtcNow;
            SQLiteHelper.ExecuteNonQuery(ConnectionString, query, toSave.EmailAddress, toSave.BounceCount, toSave.BounceAddress, toSave.EditedOn.Ticks,
                                         toSave.CreatedOn.Ticks, toSave.ID);
EditedOn = new DateTime(Convert.ToInt64(reader["EditedOn"])),
Part of the creation statement.
Hopefully that helps a bit. I would provide atleast a time, even if it is a min value. Since a null may cause issues, if it will even let you do it.
Matt Petty
Software Developer
SmarterTools Inc.
(877) 357-6278

Reply to Thread