N
N
NotToxic2020-08-10 21:15:19
Python
NotToxic, 2020-08-10 21:15:19

Convert seconds to seconds, minutes, hours, days, months, years?

I have seconds how to convert to seconds, minutes, hours, days, months, years with a converter?

seconds_in_hour = 3600
        seconds_in_minute = 60

        seconds = int(error.retry_after)

        hours = seconds // seconds_in_hour
        seconds = seconds - (hours * seconds_in_hour)

        minutes = seconds // seconds_in_minute
        seconds = seconds - (minutes * seconds_in_minute)

how can i add days, month, years

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SKEPTIC, 2020-08-10
@NotToxic0

Find the integer when dividing and and the remainder of the next value

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question