title: Java Calendar - get Hour and Minute
body: <p>I want to get Date from DB and get from date year, month, day, hour and minutes</p>
  
  <p>The way i'm doing it is:</p>
  
  <pre><code>Date dateStart = calendarEvents.getDateStart();
  
          java.util.Calendar calendarEventStart = java.util.Calendar.getInstance();
          calendarEventStart.setTime(dateStart);
  
          java.util.Calendar now = java.util.Calendar.getInstance();
  
          parseDateToCalendar.setYearStart(now.get(calendarEventStart.YEAR));
          parseDateToCalendar.setMonthStart(now.get(calendarEventStart.MONTH));
          parseDateToCalendar.setDayStart(now.get(calendarEventStart.DAY_OF_MONTH));
          parseDateToCalendar.setHourStart(now.get(calendarEventStart.HOUR_OF_DAY));
          parseDateToCalendar.setMonthStart(now.get(calendarEventStart.MINUTE));
  </code></pre>
  
  <p>And java suprise me, cose in DB my date is:</p>
  
  <pre><code>2014-05-21 04:15:00.0
  </code></pre>
  
  <p>dateStart variable has also date</p>
  
  <pre><code>2014-05-21 04:15:00.0
  </code></pre>
  
  <p>but <code>now.get(calendarEventStart.HOUR_OF_DAY</code> display: <code>14</code></p>
  
  <p>and <code>now.get(calendarEventStart.MINUTE)</code> display: <code>46</code></p>
  
  <p>WHY and what to do to get correct hour and minutes ?</p>
  
  <p>YOU WERE RIGHT - NOW IS CORRECT DATE, BUT NOW I HAVE ANOTHE ISSUE:</p>
  
  <pre><code>        java.util.Calendar calendarEventStart = GregorianCalendar.getInstance();
          calendarEventStart.setTime(dateStart);
  
          parseDateToCalendar.setYearStart(calendarEventStart.get(calendarEventStart.YEAR));
          parseDateToCalendar.setMonthStart(calendarEventStart.get(calendarEventStart.MONTH));
          parseDateToCalendar.setDayStart(calendarEventStart.get(calendarEventStart.DAY_OF_MONTH));
          parseDateToCalendar.setHourStart(calendarEventStart.get(calendarEventStart.HOUR_OF_DAY));
          parseDateToCalendar.setMonthStart(calendarEventStart.get(calendarEventStart.MINUTE));
  </code></pre>
  
  <p>Display:</p>
  
  <pre><code>parseDateToCalendar.getYearStart() = 2014 - THIS IS OK (YEAR)
  parseDateToCalendar.getMonthStart() = 30 - !!WRONG - THIS SHOULD BE MINUTE
  parseDateToCalendar.getDayStart() = 21 - THIS IS OK (DAY)
  parseDateToCalendar.getHourStart() = 4 - !!WRONG - THIS SHOULD BE MONTH
  parseDateToCalendar.getMinuteStart() = 0 - !!WRONG - HERE SHOULD BE VALUE FROM MONTH
  </code></pre>