Convert seconds to days hours mins?

# Thread: Convert seconds to days hours mins?

1. Junior Member
Join Date
Dec 1969
Posts
13

## Convert seconds to days hours mins?

Does anyone know how to convert seconds to days hours mins in ASP?<BR><BR>Thanks!

2. Senior Member
Join Date
Dec 1969
Posts
11,247

## RE: Convert seconds to days hours mins?

simple math :<BR>use instead of / and mod for remainder....

3. Senior Member
Join Date
Dec 1969
Posts
506

## It's a simple calculation...

How many seconds in a minute? In an hour? In a day? I simply can&#039;t bring myself to give you the code, so I&#039;ll just suggest that you run with it!

4. Senior Member
Join Date
Dec 1969
Posts
11,247

## RE: It's a simple calculation...

hint: 60 is the first answer<BR>

5. Junior Member
Join Date
Dec 1969
Posts
13

## RE: It's a simple calculation...

Big help... :(

6. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## What's the problem?

They gave you an informative answer -<BR><BR>To get the # hours, minutes and seconds, you need to use simple mathematics.<BR><BR>For instance, if you have 10 barrels of apples. Each barrel holds 4 apples, how many apples do you have?<BR><BR>And, if you have 10 lbs. of fish that you want to break down into 2 lbs. packages, how many packages can you make?

7. Senior Member
Join Date
Dec 1969
Posts
11,247

## further clue

find out the number of seconds in a day first!<BR>60 seconds in a minute<BR>60 minutes in a hour<BR>24 hour in a day<BR>7 days in a week

8. Junior Member
Join Date
Dec 1969
Posts
13

## RE: further clue

still does not help

9. Senior Member
Join Date
Dec 1969
Posts
11,247

## What do you want?

numberofminutes = Bignumber 60<BR>numberofsecondsremainingfromBignumber = Bignumber mod 60<BR>Now is that enough or do I have to write it all out?

10. Junior Member
Join Date
Dec 1969
Posts
13

## RE: What do you want?

You try and write it (and don&#039;t share) and see how easy it is. You will see what I mean...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•