public static void main(String[] args) throws ParseException, ClassNotFoundException {
        Connection connect = null;
        PreparedStatement preparedStatement = null;
        String t = "17:04:26.636";
        System.out.println(t);
        
        DateFormat format = new SimpleDateFormat("HH:mm:ss.SSS");
        Date date = format.parse(t);
        System.out.println(date.getTime());
        
        Date datse = new Date(date.getTime());
        DateFormat formatter = new SimpleDateFormat("HH:mm:ss.SSS");
        String dateFormatted = formatter.format(datse);
        System.out.println(dateFormatted);
        System.out.println(System.nanoTime());
        try {
            // this will load the MySQL driver, each DB has its own driver
            Class.forName("com.mysql.jdbc.Driver");
            // setup the connection with the DB.    
            connect = DriverManager.getConnection("jdbc:mysql://localhost/cdr_data?user=root&password=root");
            // preparedStatements can use variables and are more efficient
            preparedStatement = connect.prepareStatement("insert into test1 (ID,t) values (?,TIME_FORMAT(?, '%H:%i:%s.%f'));");
            preparedStatement.setInt(1, 10);
            preparedStatement.setString(2, "17:04:26.29");
            preparedStatement.executeUpdate();
            

        } catch (SQLException e) {
            Logger.getLogger(ConcurrentDataInsertTest.class.getName()).log(Level.SEVERE, null, e);
        }
    }