Date date = new Date();
        try {
            date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").parse(s);
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        Timestamp timestamp=new Timestamp(date.getTime());
        id=Long.parseLong(timestamp.toString());
On executing the above code I got this error:
java.lang.NumberFormatException: For input string: "2018-08-29 16:35:31.753"
    at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
What's wrong in it now?