1

android convert Date to TimeStamp

view story
linux-howto

http://stackoverflow.com – Following code is working fine in my java application. But when I am making the same application for Android using java it's showing error "The constructor Timestamp(long) is undefined" in the following bold line "Timestamp rtnTS = new Timestamp(theDate.getTime());" public static Timestamp createTimeStamp(String strTime, String strFormat) throws Exception { strTime = strTime.trim(); SimpleDateFormat formatter = new SimpleDateFormat(strFormat); java.util.Date theDate = new java.util.Date(); theDate = (java.util.Date) formatter.parse(strTime); **Timestamp rtnTS = new Timest (HowTos)