Here you can find the source of date2String(Date date)
Parameter | Description |
---|---|
date | a date data type |
public static String date2String(Date date)
//package com.java2s; /* ************************************************************************* * * Copyright (c) 2002, SeeBeyond Technology Corporation, * All Rights Reserved/* www . j a v a2s . co m*/ * * This program, and all the routines referenced herein, * are the proprietary properties and trade secrets of * SEEBEYOND TECHNOLOGY CORPORATION. * * Except as provided for by license agreement, this * program shall not be duplicated, used, or disclosed * without written consent signed by an officer of * SEEBEYOND TECHNOLOGY CORPORATION. * ***************************************************************************/ import java.text.SimpleDateFormat; import java.util.Date; public class Main { static SimpleDateFormat SDFDATE; /** * This method convert date to format string * * @param date a date data type * @return date string */ public static String date2String(Date date) { if (date == null) { return ""; } return SDFDATE.format(date); } }