How to cast Long to Int in Scala? June 1, 2023 by Tarik Use the .toInt method on Long, i.e. seconds.toInt