date To SQL Timestamp - Android java.sql

Android examples for java.sql:Date

Description

date To SQL Timestamp

Demo Code


//package com.java2s;

import java.sql.Timestamp;

public class Main {
    public static Timestamp dateToSQLTimestamp(java.util.Date d) {

        return d != null ? new Timestamp(d.getTime()) : null;
    }//from w w  w.j  a  v a2s. c o  m
}

Related Tutorials