Java Date Now getCurrentDateTime()

Here you can find the source of getCurrentDateTime()

Description

get Current Date Time

License

Open Source License

Declaration

private static String getCurrentDateTime() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Calendar;

public class Main {
    private static String getCurrentDateTime() {
        Calendar currentDate = Calendar.getInstance();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MMM/dd HH:mm:ss");
        String dateNow = formatter.format(currentDate.getTime());
        return dateNow;
    }//w  w  w . j  a  v  a2  s . c o  m
}

Related

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