Java Time Format getTimeFormatted()

Here you can find the source of getTimeFormatted()

Description

get Time Formatted

License

Apache License

Declaration

private static String getTimeFormatted() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

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

public class Main {
    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd - HH:mm:ss");

    private static String getTimeFormatted() {
        return sdf.format(new Date()) + " - ";
    }//  w  w  w  .j a va 2  s.  co m
}

Related

  1. getTimeFormat()
  2. getTimeFormat(Date date, String strFormat)
  3. getTimeFormat(java.util.Date date)
  4. getTimeFormat(Locale locale)
  5. getTimeFormat(String format)
  6. getTimeFormatter()
  7. getTimeFromString(String time, SimpleDateFormat formatter)
  8. getTimeFromString(String timeStr, String format)
  9. getTimeInProvenanceFormat(Date date)