I have a two strings values that represent opening hours of a shop like :
val startHour = "08:00"
val endHour = "19:00"
I want to check if shop is open by comparing current time between these two times. I tried like below :
val hourFormat = SimpleDateFormat("HH:mm:ss")
val startTime = hourFormat.parse(startHour)
val endTime = hourFormat.parse(endHour )
but I get parse exception.
Any one has an idea ?