Java Timestamp Now getCurrentSQLTimestamp()

Here you can find the source of getCurrentSQLTimestamp()

Description

Gets the current SQL timestamp.

License

Apache License

Return

the current SQL timestamp

Declaration

public static final java.sql.Timestamp getCurrentSQLTimestamp() 

Method Source Code

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

import java.util.Calendar;

public class Main {
    /**//from w ww  .ja v a2 s.  c  om
     * Gets the current SQL timestamp.
     *
     * @return the current SQL timestamp
     */
    public static final java.sql.Timestamp getCurrentSQLTimestamp() {
        Calendar c = Calendar.getInstance();
        java.sql.Timestamp t = new java.sql.Timestamp(c.getTimeInMillis());
        return t;
    }
}

Related

  1. getAfterSecond(Timestamp currentDate)
  2. getCurrentAgeForDate(Timestamp birthDate, Timestamp endDate)
  3. getCurrentDateAsTimestamp()
  4. getCurrentDateTimestamp()
  5. getCurrentDBTimestamp()
  6. getCurrentSQLTimestamp()
  7. getCurrentTimeStamp()
  8. getCurrentTimeStamp()
  9. getCurrentTimeStamp()