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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:54:39+00:00 2026-05-20T22:54:39+00:00

I am querying CallLog.Calls content provider for call details. Everything works fine except when

  • 0

I am querying CallLog.Calls content provider for call details. Everything works fine except when I try to query by dates. That is, to get call details for a particular date or date range etc. I know the date are stored as long (millisecond format) so I tried to convert the date first and then query by it, but I must be doing something wrong here. Here’s the query I am running, pls note that it works well when I remove the “WHERE DATE =” part or replace it by something like “WHERE TYPE=” etc. So, how do I run a query to get call details for a date or date range? Any help on this? Thanks.

Cursor c = getContentResolver().query(CallLog.Calls.CONTENT_URI, null,
               CallLog.Calls.DATE + "<=?",
                new String[] { String.valueOf(dateSTR)}, ORDER_BY);
        startManagingCursor(c); 
  • 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-20T22:54:40+00:00Added an answer on May 20, 2026 at 10:54 pm

    This is how i do it:

    Cursor c = contentResolver.query(CallLog.Calls.CONTENT_URI,
                    new String[] { CallLog.Calls.DATE, CallLog.Calls.DURATION,
                            CallLog.Calls.NUMBER, CallLog.Calls._ID },
                    CallLog.Calls.DATE + ">?",
                    new String[] { String.valueOf(resetDate.getTime())},
                    CallLog.Calls.NUMBER + " asc");
    

    resetDate is a Date variable, set to the beginning of the period i want to cover.

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

Sidebar

Related Questions

I am querying the CallLog.Calls content provider for call details. I do something of
I'm querying a SQL db from excel using vba, that all works fine but
Simply querying running jobs using something like select * from dba_jobs_running; works fine when
I am querying information from Active Directory . I have code that works, but
Im not good in querying. I would like to ask if this query works.
I'm querying the database for a single record that matches the id passed in
I'm querying an MFC implemented COM object that is implemented as follows: class CA
I am querying database from my EJB Bean, which is DAO, my query look's
In querying an API that has a paginated list of unknown length I found
While querying RavenDB I am noticing that it does not get the expected results

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.