I am trying to convert String date in long in android studio : I AM CONVERTING STRING DATE INTO LONG BUT I AM NOT UNDERSTANDING HOW TO RETURN THE LONG VALUE
and how to convert a string into long and store in room database 

```

package com.example.mybugetssimple;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateConverter {

   public static long dateCon(String string_date){

        string_date = "12-December-2012";

           SimpleDateFormat f = new SimpleDateFormat("dd-MMM-yyyy");
           try {
               Date d = f.parse(string_date);
               long milliseconds = d.getTime();
               return milliseconds;
           } catch (ParseException e) {
               e.printStackTrace();
       }
       return 1;
   }
}
```