Here you can find the source of getCurrentDateTime()
Parameter | Description |
---|
public static String getCurrentDateTime() throws ParseException
//package com.java2s; /*/*from w ww .ja va 2 s. com*/ * @(#)ConversionUtils.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.text.ParseException; import java.text.SimpleDateFormat; public class Main { protected static SimpleDateFormat userTimeFmt = new SimpleDateFormat("dd-MM-yyyy'-'HH:mm"); /** * This method provide the current date and current time * * @param * @return TimeStamp */ public static String getCurrentDateTime() throws ParseException { java.util.Date today = new java.util.Date(); String currentDateTime = userTimeFmt.format(today); return currentDateTime; } }