Android Time Get getTimeAsInt()

Here you can find the source of getTimeAsInt()

Description

get Time As Int

Declaration

public static final int getTimeAsInt() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static final int getTimeAsInt() {
        Calendar cal = Calendar.getInstance();
        java.text.SimpleDateFormat sdf = new SimpleDateFormat("HHmmss");
        String cdate = sdf.format(cal.getTime());
        return Integer.parseInt(cdate);
    }//ww  w .ja  v  a  2s. co  m
}

Related

  1. getDateTime(String format)
  2. getDateTimeFromCal(Calendar cal)
  3. getTimeStr(Date date)
  4. getTimeString(String strTime)
  5. getNowDateTime()
  6. nowAsTime()
  7. getCurrentTimeCalendar()
  8. getCurrentTimeStr()
  9. getCurrentTimeString()