Android Long to Date Convert getMonth(long dateTimeMillis)

Here you can find the source of getMonth(long dateTimeMillis)

Description

get Month

Declaration

public static int getMonth(long dateTimeMillis) 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;

public class Main {
    public static int getMonth(long dateTimeMillis) {
        SimpleDateFormat format = new SimpleDateFormat("MM");
        StringBuilder dateString = new StringBuilder(
                format.format(dateTimeMillis));
        return Integer.parseInt(dateString.toString()) - 1;
    }//from  w  w  w  . j  a v  a2  s  .c o m
}

Related

  1. getHoursAndMinutes(long dateTimeMillis)
  2. getLocalTimeFromUTCMillis(long utcMillis)
  3. getLongOfString(String date)
  4. getMinute(long dateTimeMillis)
  5. getMinutesSinceStartOfDay(long milliseconds)
  6. getNameForDcim(long time)
  7. getNameForFile(long time)
  8. getNumberOfDaysPassed(long date1, long date2)
  9. getReadableTimeStamp(long timeStamp)