Here you can find the source of convertTime2String(long time)
Parameter | Description |
---|---|
time | a parameter |
public static String convertTime2String(long time)
//package com.java2s; /*//from ww w . ja v a2 s.c o m * @(#)ConversionUtil.java * * Copyright by ObjectFrontier, Inc., * 12225 Broadleaf Lane, Alpharetta, GA 30005, U.S.A. * All rights reserved. * * This software is the confidential and proprietary information * of ObjectFrontier, Inc. 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 ObjectFrontier. */ import java.sql.Timestamp; import java.text.SimpleDateFormat; public class Main { protected static SimpleDateFormat borDateFmt = new SimpleDateFormat("dd-MM-yyyy-hh_mm_ss"); /** * * @param time * @return */ public static String convertTime2String(long time) { return convertTS2String(new Timestamp(time)); } /** * This method is used to Convert Timestamp * to UserDefined Format * @param timeStamp * @return String */ public static String convertTS2String(Timestamp timeStamp) { return borDateFmt.format(timeStamp); } }