Here you can find the source of dateTime2String(Date value)
Parameter | Description |
---|---|
value | Date |
public static String dateTime2String(Date value)
//package com.java2s; /*//from w w w.j a v a2 s .co m * Copyright (C) 2010 Viettel Telecom. All rights reserved. * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.text.SimpleDateFormat; import java.util.Date; public class Main { /** * * @param value Date * @return String */ public static String dateTime2String(Date value) { if (value != null) { SimpleDateFormat dateTime = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); return dateTime.format(value); } return ""; } }