Here you can find the source of getTimestampFromDateTime(DateTime dateTime)
public static Timestamp getTimestampFromDateTime(DateTime dateTime)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.util.TimeZone; import org.joda.time.DateTime; public class Main { public static Timestamp getTimestampFromDateTime(DateTime dateTime) { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); Timestamp timestamp = null; if (dateTime != null) { timestamp = new Timestamp(dateTime.getMillis()); }/*from w ww . ja v a2 s . co m*/ return timestamp; } }