Java Timestamp Create getTimestamp(Object o)

Here you can find the source of getTimestamp(Object o)

Description

get Timestamp

License

Open Source License

Parameter

Parameter Description
o a parameter

Declaration

public static Timestamp getTimestamp(Object o) 

Method Source Code

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

import java.sql.Timestamp;

import java.util.Date;

public class Main {
    /**//from w w w.j  ava2  s.c  om
     * 
     * @param o
     * @return
     */
    public static Timestamp getTimestamp(Object o) {
        Timestamp sh = null;
        if (null == o)
            return sh;

        if (o instanceof Date) {
            sh = (Timestamp) o;
        }
        return sh;
    }
}

Related

  1. getTimestamp(final Map map, final Object key)
  2. getTimestamp(int offset)
  3. getTimestamp(int year, int month, int day, int hour, int min, int second)
  4. getTimestamp(java.util.Date utilDate)
  5. getTimestamp(long time)
  6. getTimestamp(Object value)
  7. getTimestamp(Object value, int columnType)
  8. getTimestamp(ResultSet rs, String colName)
  9. getTimestamp(ResultSet rs, String strColName)