Java Date Now getCurrentDateTime()

Here you can find the source of getCurrentDateTime()

Description

get Current Date Time

License

Open Source License

Declaration

public static String getCurrentDateTime() 

Method Source Code

//package com.java2s;
/**// ww w  .  j a va 2 s . co  m
 * Created on Aug 9, 2004
 *
 * Copyright 2005 by Arysys Technologies (P) Ltd.,
 * #3,Shop line,
 * Sasmira Marg,
 * Worli,Mumbai 400 025
 * India
 *
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Arysys Technologies (P) Ltd. ("Confidential Information").
 * 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 Arysys Technologies (P) Ltd.
 *
 */

import java.text.Format;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getCurrentDateTime() {
        String s = "";
        Format formatter;
        Date rightNow = new Date();
        formatter = new SimpleDateFormat("EEEE , dd MMM yyyy HH:mm:ss");
        s = formatter.format(rightNow);
        return s;
    }
}

Related

  1. getCurrentDateTime()
  2. getCurrentDateTime()
  3. getCurrentDateTime()
  4. getCurrentDateTime()
  5. getCurrentDateTime()
  6. getCurrentDateTime()
  7. getCurrentDateTime()
  8. getCurrentDateTime()
  9. getCurrentDateTime(String dateFormat)