Here you can find the source of parseTimestampToString(Timestamp stamp, String dateFormat)
Parameter | Description |
---|---|
stamp | a parameter |
dateFormat | a parameter |
public static String parseTimestampToString(Timestamp stamp, String dateFormat)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /***// w w w .j av a 2 s.c o m * * @param stamp * @param dateFormat * @return String */ public static String parseTimestampToString(Timestamp stamp, String dateFormat) { SimpleDateFormat sdf = new SimpleDateFormat(dateFormat); return sdf.format(new Date(stamp.getTime())); } }