I'm also having trouble with Between using the "new" syntax. I'm using the adapter and would like to use the shorter syntax from the documentation:
' VB.NET
filter.Add(new FieldBetweenPredicate( OrderFields.OrderDate, Nothing, dateStart, dateEnd))
' or: ShippingDate BETWEEN RequiredDate and dateEnd
filter.Add(new FieldBetweenPredicate( OrderFields.ShippedDate, Nothing, OrderFields.RequiredDate, dateEnd))
I've tried these with no success
1) filter.Add(OrderFields.OrderDate Between startdate and enddate)
2) filter.Add(New FieldBetweenPredicate(OrderFields.OrderDate between startDate and endDate))
3) filter.Add(New FieldBetweenPredicate(OrderFields.OrderDate, startDate, endDate))
4) filter.Add(New FieldBetweenPredicate(EntityFieldFactory.Create(OrderFieldIndex.OrderDate), startDate, endDate))
This one works but the syntax is less intuitive than what the documentation seems to show.
filter.Add(PredicateFactory.Between(OrderFieldIndex.OrderDate, startDate, endDate))
What is the correct way to do this using the new syntax?
Joel Reinford
Data Management Solutions LLC