I already made a program which says on which day of the week you were born.
Now i want to make a program which says how much days, hours, seconds, you are already alive.
Does anybody know how to do this?
thx
pacotens
Time programs
Moderator: MaxCoderz Staff
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
-
- MCF Legend
- Posts: 1601
- Joined: Mon 20 Dec, 2004 8:45 am
- Location: Budapest, Absurdistan
- Contact:
The easiest way to solve this problem is to convert dates-times to a single number each, with one reference time being represented by zero (e.g. 1900/01/01 00:00:00). For instance, in Excel the unit is day, and fractions represent the time of the day, but you could as well use seconds for the unit. This way you can easily subtract dates from each other. It's more straightforward than defining an algebra directly on them.