Question
how to calculate downtime status using from date and end date.
Hi, Everyone
I want to calculate the downtime status which shows in below image,
I am creating a program that has 'from_date and 'to_date' and their program so I want to display time status which is shown in the below image.
use case.
- Want to show the time if the program will start in 5hours (ex.' start in 5 hr',4,3,2,1)
- then change the time when it's less than an hour(ex. 'start in 59 min',58,57, etc till 0)
- change the time status when it's less than a minute (ex. 'start in 59 sec',58,57, etc till 0)
- If the program will start, the status will 'ON'(ex.' ON-59 min remain')
- If the program time will end (ex, 'END'

can you please help how can I do that,

