Java Timestamp Convert To timestampToDateString(Timestamp ts)

Here you can find the source of timestampToDateString(Timestamp ts)

Description

timestamp To Date String

License

Open Source License

Declaration

public static String timestampToDateString(Timestamp ts) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class Main {
    public static String timestampToDateString(Timestamp ts) {
        String tsStr = "";
        DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        tsStr = sdf.format(ts);/*from  w  w w . ja  v  a2s. c o  m*/
        return tsStr;
    }
}

Related

  1. TimestampToDate(Integer time)
  2. timestampToDate(java.sql.Timestamp ts)
  3. timeStampToDate(Timestamp tim)
  4. timestampToDate(Timestamp tt)
  5. TimestampToDateStr(Timestamp tmp)
  6. timestampToDayNumber(long timestamp)
  7. timestampToInternal(java.sql.Timestamp ts)
  8. timestampToLong(Timestamp ts)
  9. timestampToMicros(Timestamp timestamp)