Java SQL Time Now getNowTime()

Here you can find the source of getNowTime()

Description

get Now Time

License

Apache License

Declaration

public static String getNowTime() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.Timestamp;

public class Main {
    public static String getNowTime() {
        //      return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        return new Timestamp(System.currentTimeMillis()).toString();
    }//from  w w  w. j  a  v  a  2  s  .c  om
}

Related

  1. currentDatetime()
  2. currentTime()
  3. CurrentTimeString()
  4. getNowSQLTime()
  5. getNowTime()