Code example for Timestamp

Methods: toString

	 * Gets the current object as a formatted string for storage. (start and end time stored as timestamps) 
	 * @return String formatted as "[startTime as (yyyy-MM-dd HH:mm:ss.SSS)], [endTime as (yyyy-MM-dd HH:mm:ss.SSS)]" 
	public String sessionAsStoredString(){ 
		//should match what constructor SessionData(String storedString) needs for parsing 
	    java.sql.Timestamp timeStampBegan = new 
	    java.sql.Timestamp timeStampEnded = new 
		return timeStampBegan.toString() + storageDividerKey + timeStampEnded.toString();
	 * Compare method so we can confirm another object is essentially the same. 
	 * internally compares both start and end times, if they are both the same, theobjects are equal. 
	public int compare(Object o1, Object o2)
Stop searching for code, let great code find you!  Add Codota to your java IDE