Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1097383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:25:29+00:00 2026-05-17T00:25:29+00:00

The odata4j AppEngineConsumerExample demonstrates how to filter entities on string and numeric values with

  • 0

The odata4j AppEngineConsumerExample demonstrates how to filter entities on string and numeric values with code similar to the following:

reportEntity("\nNon-discontinued product with reorderLevel > 25 (two filter predicates): " , 
            c.getEntities("Product")
            .filter("reorderLevel gt 25 and discontinued eq false")
            .top(1)
            .execute().first());

I’m fairly new to Java (my background is .NET/C#), but the above makes sense. However, I’m unsure how to do something similar for dates. The dates coming from my WCF OData service are formatted as “yyyy-MM-dd’T’HH:mm:ss”.

Thanks in advance for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:25:30+00:00Added an answer on May 17, 2026 at 12:25 am

    It turns out this is a function of OData itself rather than odata4j. The string passed to the filter function in odata4j is the same expression that would be passed via a URL. I found tons of filter examples on the Netflix OData Catalog page.

    To filter dates, use something like this:

    reportEntity("\nProduct with order date greater than March 1, 2010: " , 
            c.getEntities("Product")
            .filter("OrderDate gt datetime'2010-03-01'")
            .top(1)
            .execute().first());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am a newbie in odata4j concepts. Using odata4j Library odata4j-0.5-nojpabundle.jar launched producer on tomcat
I am having a problem with calling a ext function in odata4j in android
My RESTful web service is passing my Producer some filter information in their request.
I have a java servlet with the OData4j library and I want to configure
I'm attempting to make an Odata post using odata4j. After dumping the posted xml
I am trying out odata4j in my android app to retrieve data from a
I am trying to use OData4J to retrieve a list of Users from the
I have an OData Producer (using odata4j Java). In the getEntities() method I check
How do I get a batch insert done in odata4j client? suppose I want
I am trying to query a WCF OData service from Java using the odata4j

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.