Here you can find the source of longFromTimestamp(Timestamp ts)
ts
, or #NULL_TIME if ts
is null
.
public static long longFromTimestamp(Timestamp ts)
//package com.java2s; import java.sql.Timestamp; public class Main { public static final long NULL_TIME = -1; /**/*from w w w .j av a 2s . c om*/ * Returns the number of milliseconds since the epoch represented * by the time stamp <code>ts</code>, or {@link #NULL_TIME} if * <code>ts</code> is <code>null</code>. */ public static long longFromTimestamp(Timestamp ts) { if (ts == null) { return NULL_TIME; } return ts.getTime(); } }