Java Time Format getFormatTime(String format)

Here you can find the source of getFormatTime(String format)

Description

get Format Time

License

Open Source License

Declaration

public static String getFormatTime(String format) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class Main {
    private static SimpleDateFormat sFormat;

    public static String getFormatTime(String format) {
        sFormat = new SimpleDateFormat(format, Locale.CHINA);
        return sFormat.format(new Date());
    }/*  www .j  av  a2 s .com*/
}

Related

  1. getFormattedTime(final Calendar calendar)
  2. getFormattedTime(final Date date)
  3. getFormattedTimeFilesafe(long t)
  4. getFormattedTimeString(double s)
  5. getFormatTime(Date date)
  6. getFormatTimeString(Date date, String pattern)
  7. getFullDateTimeFormat()
  8. getFullTime(String format, Date date)
  9. getGenerationTime(String format)