# C# Time.time Hours?

(int)Time.time % 60; gives me seconds and (int)Time.time / 60; gives me minutes. What is the equivalent for hours?

```
(int)Time.time % 60;
(int)Time.time / 60;
```

**Answer** by Bunny83
·
Nov 21, 2015 at 05:42 AM

Of course to get hours you just need to use 3600 (60*60). Btw in your case you get absolute minutes. So for example if you run the game for two hours and 30 minutes Time.time/60 returns "150".

If you need days, hours, minutes, seconds It's easier to do it in seperate steps:

```
float t = Time.time;
int sec = (int)(t%60);
t /= 60;
int minutes = (int)(t%60)
t /= 60;
int hours = (int)(t%24)
t /= 24;
int days = (int)t;
```

** edit** Here's an example with direct values:

```
float t = Time.time;
int sec = (int)(t%60);
int minutes = (int)((t/60)%60)
int hours = (int)((t/3600)%24)
int days = (int)(t/86400); // There are 86400 seconds in a day (60*60*24)
```

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.