Util.java Source code

Java tutorial

Introduction

Here is the source code for Util.java

Source

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

public class Util {
    public static String getTimeFromDate(Date date) throws ParseException {
        DateFormat formatter = new SimpleDateFormat("HH:mm:ss.SSS");
        return formatter.format(date);
    }

}