Here you can find the source of getTimeFormatted()
private static String getTimeFormatted()
//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 }