Java Time to String timeToString(Date date)

Here you can find the source of timeToString(Date date)

Description

time To String

License

Apache License

Declaration

public static String timeToString(Date date) 

Method Source Code

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

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

public class Main {
    public static String TIME_PARTTEN = System.getProperty("TIME_PARTTEN", "yyyy-MM-dd HH:mm:ss");

    public static String timeToString(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat(TIME_PARTTEN);
        return sdf.format(date);
    }//from   w ww . j  av  a2  s .  c o  m
}

Related

  1. timeToFullString(long time, boolean longNames)
  2. timeToStr(int time)
  3. timeToStr(String time)
  4. timeToString(Calendar date)
  5. timeToString(Date d, String tzString)
  6. timeToString(double d)
  7. timeToString(double time, boolean longNames)
  8. timeToString(final Date date)
  9. timeToString(final long time)