Java Timestamp Field getDateTimeFromSqlTimestamp(Timestamp timestamp)

Here you can find the source of getDateTimeFromSqlTimestamp(Timestamp timestamp)

Description

get Date Time From Sql Timestamp

License

Open Source License

Declaration

public static String getDateTimeFromSqlTimestamp(Timestamp timestamp) 

Method Source Code


//package com.java2s;
/*// w  ww .j  a v  a  2s. com
 * Copyright (c) 2015. Sandata Technologies, LLC
 * 26 Harbor Park Drive, Port Washington, NY 11050, 800-544-7263
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of Sandata Technologies, LLC
 * ("Confidential Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered into with
 * Sandata.
 */

import java.sql.Timestamp;

public class Main {
    public static String getDateTimeFromSqlTimestamp(Timestamp timestamp) {
        if (timestamp != null) {
            return timestamp.toString().substring(0, 19);
        }
        return "";
    }
}

Related

  1. getDateString(java.sql.Timestamp ts)
  2. getDateString(Timestamp time, String pattern)
  3. getDateTime(Timestamp argRenDt)
  4. getDateTime(Timestamp timestamp)
  5. getDateTimeFromTimeStamp(Timestamp timestamp)
  6. getDateTimestamp(ResultSet rs, String columnLabel)
  7. getDateTimeStr(Timestamp timestamp)
  8. getDateTimeString(java.sql.Timestamp ts)