see http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date this function is dependent on the exact formatting of the mysql date/time string . concode_field_sep String[] FORMAT_REPLACE concode_elem_sep String DATE_TIME_FORMAT concode_field_sep int unixTimestamp concode_elem_sep int unixTimestamp concode_elem_sep String fromUnixTime concode_elem_sep String fromUnixTime concode_elem_sep String convertToSimpleDateFormat concode_elem_sep void register
String function ( String arg0 ) { if ( arg0 == null ) { return null ; } int loc0 = arg0 . indexOf ( ' ' ) ; if ( loc0 != - 1 ) { return arg0 . substring ( 0 , loc0 ) ; } return arg0 ; }