Java Timestamp to String timestampToString(Timestamp now, String pattern)

Here you can find the source of timestampToString(Timestamp now, String pattern)

Description

timestamp To String

License

Open Source License

Declaration

public static String timestampToString(Timestamp now, String pattern) 

Method Source Code

//package com.java2s;
/**// w w  w  .  j  av a 2s. c  o m
 * Copyright (c) 2015 SK holdings Co., Ltd. All rights reserved.
 * This software is the confidential and proprietary information of SK holdings.
 * 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 SK holdings.
 * (http://www.eclipse.org/legal/epl-v10.html)
 */

import java.sql.Timestamp;

import java.text.SimpleDateFormat;

public class Main {

    public static String timestampToString(Timestamp now, String pattern) {
        SimpleDateFormat sf = new SimpleDateFormat(pattern);
        return sf.format(now);
    }
}

Related

  1. timeStampToString(final Timestamp timestamp, final String format)
  2. timestampToString(java.sql.Timestamp a_Timestamp, String aS_Format)
  3. timestampToString(long timestamp)
  4. timestampToString(long timestamp)
  5. timeStampToString(Timestamp date, String dateFmt)
  6. timeStampToString(Timestamp stamp, String dateTimeFormat, TimeZone tz, Locale locale)
  7. timestampToString(Timestamp timestamp)
  8. timestampToString(Timestamp timestamp)
  9. timestampToString(Timestamp timestamp, String pattern)