DateTime cannot be converted to Date
<p>I want to get all events from today from Outlook calendar:</p>

<pre><code>public void findAppointmentsToday(String outlook_url, String username, String password) throws Exception
    {
        ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
        ExchangeCredentials credentials = new WebCredentials(username, password);

        URI url = URI.create("https://outlook.com/ews/Exchange.asmx");
        service.setUrl(url);
        service.setTraceEnabled(true);
        service.setCredentials(credentials);

//        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        Date startDate1 = formatter.parse(start_date);
//        Date endDate1 = formatter.parse(end_date);

        Date currentDate = new Date();
        DateTime start = new DateTime(DateTimeUtil.getDateBeginning(currentDate));
        DateTime end = new DateTime(DateTimeUtil.getDateEnding(currentDate));

        CalendarFolder cf = CalendarFolder.bind(service, WellKnownFolderName.Calendar);
        FindItemsResults&lt;Appointment&gt; findResults = cf.findAppointments(new CalendarView(start, end));

        for (Appointment appt : findResults.getItems())
        {
            System.out.println("Start :" + appt.getStart());
            System.out.println("End :" + appt.getEnd());
            System.out.println("Subject :" + appt.getSubject());
            System.out.println("AppointmentType :" + appt.getAppointmentType().name());
            System.out.println("Location :" + appt.getLocation());
            System.out.println("Duration :" + appt.getDuration().getMinutes());
            System.out.println("Email Address: " + appt.getOrganizer().getAddress());
            System.out.println("Last Modified Time: " + appt.getLastModifiedTime());
        }
    }
</code></pre>

<p>I tried to use this Java Class to get the range of events today:</p>

<pre><code>import java.util.Calendar;
import java.util.Date;

public class DateTimeUtil
{
    public static Date getDateBeginning(Date date)
    {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);

        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);

        return calendar.getTime();
    }

    public static Date getDateEnding(Date date)
    {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);

        calendar.set(Calendar.HOUR_OF_DAY, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.set(Calendar.SECOND, 59);
        calendar.set(Calendar.MILLISECOND, 999);

        return calendar.getTime();
    }
}
</code></pre>

<p>At this line I get error:</p>

<p>cf.findAppointments(new CalendarView(start, end));</p>

<pre><code>incompatible types: DateTime cannot be converted to Date
</code></pre>

<p>Can I somehow fix this problem?</p>