November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
entryQuery.PublicationStart = new DateTimeCriterion();
I believe that something like this would do what you're asking for:
entryQuery.PublicationStart = new DateTimeCriterion();
entryQuery.PublicationStart.Operator = ComparisonOperator.GreaterThan | ComparisonOperator.Equals;
entryQuery.PublicationStart.Value = myRangeStart;
entryQuery.PublicationStart.Operator2 = ComparisonOperator.LessThan | ComparisonOperator.Equals;
entryQuery.PublicationStart.Value2 = myRangeEnd;
(If you don't want the interval to be inclusive you can just remove the bitwise OR with Equals)
/Håkan
I'm trying to create a query of Entry by date range on the PublicationStart property of the class.
I can't work out how you add the range, I can't find any examples, does anyone have any?
I've done the usual:
EntryQuery entry = new EntryQuery();
entry.PublicationStart = new DateTimeCriterion();
I was looking at entry.PublicationStart.Operator as this is a RangeCriterion(), but I can't really work out how to use it......
On a separate note, are there any good resources of examples/docs of how to use the Query system? The Community SDK is good for really basic examples but lacks the more complex stuff that is most likely to arise when implementing in real situations.