title: Android: How to get hour/min in milliseconds
body: <p>I am using timepicker. I can get date(calendar) in milliseconds but cant figure out with timepicker</p>
  
  <p>with date i used: </p>
  
  <pre><code>GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("US/Central"));
  cal.setTimeInMillis(calendarView.getDate());
  Date date = new Date(calendarView.getDate() / 1000L);
  long timestamp = date.getTime()
  //and this works
  </code></pre>
  
  <p>But i dont know with timePicker becouse i get two int's: hour, min.</p>
  
  <p>Im just out of plays and dont know much more to try.. Could use the help</p>
  
  <p><strong>SOLUTION:</strong></p>
  
  <p>Dummy me just need to say the problem outloud.. Hopfully it will help someone else..</p>
  
  <pre><code> long hour = timePicker.getCurrentHour();
   long min = timePicker.getCurrentMinute();
  
   hour = TimeUnit.HOURS.toMillis(hour);
   min = TimeUnit.MINUTES.toMillis(min);
  </code></pre>