Search code examples
db4osoda

Using DateTime under db4o with native SODA queries?


Under db4o, I'm attempting to constrain by a "new DateTime(2010,10,14)" but it doesn't seem to work - any opinions on how to fix this?


Solution

  • Got it:

    var query2 = db4o.db.Query();
    query2.Constrain(typeof(TradingDay));
    query2.Descend("_date").Constrain(new DateTime(2010,10,14));
    IObjectSet result2 = query2.Execute();