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 4003098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:06:40+00:00 2026-05-20T08:06:40+00:00

i have a problem with a query in my custom contentProvider i want to

  • 0

i have a problem with a query in my custom contentProvider

i want to query my timestamp field (TaskDescriptor.DUE_DATE).

First i instanciate my Calendar object in this manner:

Calendar minorRange = Calendar.getInstance();
        minorRange.set(Calendar.HOUR, 00);
        minorRange.set(Calendar.MINUTE, 00);
        minorRange.set(Calendar.SECOND, 00);

        Calendar majorRange = Calendar.getInstance();
        majorRange.set(Calendar.HOUR, 24);
        majorRange.set(Calendar.MINUTE, 00);
        majorRange.set(Calendar.SECOND, 00); 

then i query the contentprovider :

Cursor cursor = activity.managedQuery(TaskDescriptor.CONTENT_URI,
                        PROJECTION, TaskDescriptor.DUE_DATE + " >= ? " + " AND " + TaskDescriptor.DUE_DATE + " <=?",
                        new String[] { minorRange.getTimeInMillis() + "", majorRange.getTimeInMillis() + ""}, TaskDescriptor.PRIORITY_SORT_ORDER);

The query run perfectly but don’t retrieve any records… The Field are Timestamp.

Anyone know how can I do this ?

Thanks, Regards.

Antonio Musella

  • 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-20T08:06:41+00:00Added an answer on May 20, 2026 at 8:06 am

    ok … thanks all … this query works fine … i’m wrong .. it’s only a maven refresh problem ! … thanks all
    Regards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with an SQL query on Postgresql. This select clause is
I have a performance problem on a query. First table is a Customer table
I seem to have a problem with this SQL query: SELECT * FROM appts
I have run into this problem: Custom Methods & Extension Methods cannot be translated
I have a similar problem with this ( https://wordpress.stackexchange.com/questions/9593/custom-post-type-archive-with-pagination ) and can't really figure
I have a custom UserType which stores a date/time value in a TIMESTAMP field
here is briefly the problem I'm facing: I have built a custom Content Query
I have a problem with the query below in postgres SELECT u.username,l.description,l.ip,SUBSTRING(l.createdate,0,11) as createdate,l.action
I have a problem with a query using hibernate. The entity class EntityClass has
I have a problem with the following Linq query using Entity Framework: from o

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.