Java SQL Date From getCurTime()

Here you can find the source of getCurTime()

Description

get current time

License

Open Source License

Return

Timestamp

Declaration

public static Timestamp getCurTime() 

Method Source Code


//package com.java2s;
import java.sql.Timestamp;

import java.util.Calendar;

public class Main {
    /**/*from  ww  w  .  j  a v  a  2s. c o  m*/
     * get current time
     * 
     * @return Timestamp
     */
    public static Timestamp getCurTime() {
        return new Timestamp(Calendar.getInstance().getTime().getTime());
    }

    public static String getTime() {
        Timestamp time = new Timestamp(Calendar.getInstance().getTime().getTime());
        return time.toString();
    }
}

Related

  1. getCurrentTime()
  2. getCurrentTime(String format)
  3. getCurrentTimeMillis()
  4. GetCurrFormattedDateTime(String strFormatTo)
  5. getCurrTime()
  6. getDatabaseLocalTime(Time databaseDate)
  7. getDateTime()
  8. getDateTime()
  9. getDateTime()