Java Timestamp sqlDateConvertoStr(Timestamp date)

Here you can find the source of sqlDateConvertoStr(Timestamp date)

Description

sql Date Converto Str

License

Open Source License

Declaration

public static String sqlDateConvertoStr(Timestamp date) 

Method Source Code

//package com.java2s;

import java.sql.Timestamp;

import java.text.SimpleDateFormat;

public class Main {

    public static String sqlDateConvertoStr(Timestamp date) {
        if (date == null)
            return null;

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        return sdf.format(date);
    }/*w w w . ja  v  a  2 s . c  o  m*/
}

Related

  1. safeTimestamp(Date value)
  2. setTimestamp(byte[] ba, int offset, Timestamp val)
  3. setTimestamp(int index, Timestamp t, PreparedStatement stmt)
  4. setTimestampOrNull(PreparedStatement pstmt, int paramIndex, Timestamp value)
  5. sqlDate(Timestamp t)
  6. sqlDateToCalendar(Timestamp date)
  7. SQLTimestampToDate(java.sql.Timestamp ts)
  8. sqlTimestampToDate(Timestamp t)
  9. StrToDateTimeFormat(String timestampStr,String pattern)