Number of days between two epoch days in scala

Viewed 2812

I have two epoch timestamps, I am trying to find the number of days between the two timestamps.

This is what I have now:

dateFrom = inputEntry.getValue(inputFields(0).get).asInstanceOf[String].toLong
dateTo =inputEntry.getValue(inputFields(1).get).asInstanceOf[String].toLong

Example:

dateFrom    dateTo      result
1501583232  1501641000  1
1501583232  1501986600  5

I am starting with two epoch dates here

2 Answers
Related