Here you can find the source of convertToString(java.util.Date date)
Parameter | Description |
---|
public static String convertToString(java.util.Date date)
//package com.java2s; /*/*from w ww . jav a2 s .co 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. */ public class Main { /** * This method returns the string * * @param java.util.Date date * @return String in dd-MMM-yy format * * For converting Timestamp object into a String */ public static String convertToString(java.util.Date date) { java.text.SimpleDateFormat out = new java.text.SimpleDateFormat("dd-MMM-yy"); return out.format(date); } }