Skip to main content
1 of 4
BenjyTec
  • 12.6k
  • 4
  • 27
  • 56

In case of LocalDate, which you are referring to in the description of your question, you can use the toEpochDay() method. It returns the number of days since 01/01/1970. That number then can be easily converted to milliseconds:

long dateInMillis = TimeUnit.DAYS.toMillis(myLocalDate.toEpochDays()); 

Documentation can be found here.

BenjyTec
  • 12.6k
  • 4
  • 27
  • 56