src/org/ohmage/util/StringUtils.java
public static String stripMillisFromJdbcTimestampString(String timestamp) {
		if(null != timestamp) {
			if(timestamp.contains(".")) {
				return timestamp.substring(0, timestamp.lastIndexOf('.'));
			} 
			else {
				return timestamp;
			}
		}	
		return null;
	}
/**
	 * Strips off the millseconds value from a JDBC timestamp String returned from the MySQL JDBC connector.
	 * 
	 * @param timestamp The timestamp to strip the nanos from.
	 * 
	 * @return A newly formatted String in the format 'yyyy-MM-dd hh:mm:ss' or null if the provided String is null.
	 */
Strips off the millseconds value from a JDBC timestamp String returned from the MySQL JDBC connector.

@param timestamp The timestamp to strip the nanos from.

@return A newly formatted String in the format 'yyyy-MM-dd hh:mm:ss' or null if the provided String is null.
Strips off the millseconds value from a JDBC timestamp String returned from the MySQL JDBC connector . @param timestamp The timestamp to strip the nanos from . @return A newly formatted String in the format ' yyyy - MM - dd hh : mm : ss ' or null if the provided String is null .
public static String stripMillisFromJdbcTimestampString(String timestamp) {
		if(null != timestamp) {
			if(timestamp.contains(".")) {
				return timestamp.substring(0, timestamp.lastIndexOf('.'));
			} 
			else {
				return timestamp;
			}
		}	
		return null;
	}
public static String stripMillisFromJdbcTimestampString ( String timestamp ) { if ( null != timestamp ) { if ( timestamp . contains ( "." ) ) { return timestamp . substring ( 0 , timestamp . lastIndexOf ( '.' ) ) ; } else { return timestamp ; } } return null ; }
Strips off the millseconds value from a JDBC timestamp String returned from the MySQL JDBC connector.
Strips off the millseconds value from a JDBC timestamp String returned from the MySQL JDBC connector .