Java Date Now getCurrentTimestamp()

Here you can find the source of getCurrentTimestamp()

Description

get Current Timestamp

License

Open Source License

Declaration

public static String getCurrentTimestamp() 

Method Source Code

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

import java.util.Date;

import java.text.SimpleDateFormat;

public class Main {
    public static String getCurrentTimestamp() {

        SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
        String time = dateFormat.format(new Date());

        return time;
    }// ww  w  . j  av a  2s  .  c o  m
}

Related

  1. getCurrentTimeInString(SimpleDateFormat dateFormat)
  2. getCurrentTimeInString(String format)
  3. getCurrentTimeNoHour()
  4. getCurrentTimeNumber()
  5. getCurrentTimeOfDay()
  6. getCurrentTimeStamp()
  7. getCurrentTimestamp()
  8. getCurrentTimeStamp()
  9. getCurrentTimestamp()