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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:02:07+00:00 2026-05-26T16:02:07+00:00

I am trying to insert Call Logs in inbox programmatically but I am using

  • 0

I am trying to insert Call Logs in inbox programmatically but I am using getcontentresolver() for insertion. but when i am trying to insert date at that time exception is thrown.
i have String variable “date” in which date is “2011-11-04”. and i am passing it to values.put(CallLog.Calls.DATE, callDate);

my code is here

ContentValues values = new ContentValues();
values.put(CallLog.Calls.NUMBER, callnumber);
values.put(CallLog.Calls.CACHED_NAME, callLogName);
values.put(CallLog.Calls.DATE, callDate);
values.put(CallLog.Calls.DURATION, callDuration);
values.put(CallLog.Calls.TYPE, callType);
getContentResolver().insert(CallLog.Calls.CONTENT_URI,values);

Exception is “java numberformate exception”

  • 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-26T16:02:07+00:00Added an answer on May 26, 2026 at 4:02 pm

    CallLog.Calls.DATE – The date the call occured, in milliseconds since the epoch

    Type: INTEGER (long)

    Convert your date to milliseconds.

            String date = "2011-11-13";
    
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date newDate = null;
        try {
            newDate = sdf.parse(date);
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    
         Calendar cal=Calendar.getInstance();
         cal.setTime(newDate);
         cal.getTimeInMillis();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to insert a time only value, but get the following error
I'm trying to map java.util.Date to postgresql timestamp without time zone type. I'm using
When trying to insert data programatically using PHP, via the function date('c') It returns
I am trying to insert a new call on my HTC programmatically. ContentValues values
So I am trying to use jQuery to insert data from an ajax call.
I'm trying to make an ajax call to grab session data to insert into
I am trying to INSERT INTO a table using the input from another table.
I'm trying to insert some import lines into a python source file, but i
I was trying to insert new data into an existing XML file, but it's
I am trying to create a bad word filter method that I can call

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.