Comparision of android.provider.CallLog.Date fails
<p>I am new to android . And when I do below code without that comparison it works , but with that comparison it fails . </p>

<p><em><strong>Thanks to Oleg Vaskevich , Updated code with his points . 
And date range is 1-31 unlike month 0-11 
And Date(int,int,int) replaced with Date(long)</em></strong></p>

<p>edited code</p>

<pre><code>Calendar cal = Calendar.getInstance();
    cal.add(Calendar.MONTH, -1);

    int month = cal.get(Calendar.MONTH);
    int year = cal.get(Calendar.YEAR);
    int day=cal.get(Calendar.DATE); // for dynamic reset rates


    callSince.setText("since(dd/mm/yyyy) :" + day + "/" + (month+1) + "/"  + year );
        // month+1 because month {0-11}

    Date resetDateDate = new Date(cal.getTimeInMillis());


    Calendar resetDateCal = Calendar.getInstance();
    resetDateCal.setTime(resetDateDate);
    String resetDate = String.valueOf(resetDateCal.getTimeInMillis());

    /*
     * CALL INCOMING
     */

    projection = new String[] {CallLog.Calls.DURATION };
    selection = CallLog.Calls.TYPE + "=? AND " + CallLog.Calls.DATE + " &gt;=?" ;
    selectionArgs = new String[] { (String.valueOf(CallLog.Calls.INCOMING_TYPE)) , (resetDate) };

    try
    {
        Cursor cIn = getContentResolver().query(CallLog.Calls.CONTENT_URI, projection, selection, selectionArgs, sortOrder);
        startManagingCursor(cIn);
</code></pre>

<p>Help would be very useful to me . thanks </p>
