What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Formula to calculate days lived?

Formula to calculate days lived?
Author: Message:
albert
Veteran Member
*****

Avatar

Posts: 2247
Reputation: 42
– / Male / Flag
Joined: Feb 2005
O.P. Undecided  Formula to calculate days lived?
I'm coding this program in Java and I absolutely need a formula to be able to calculte the numbers of days lived.

I searched the net, I couldn't find much.

What I came up with is this :

[ {365 * (currentyear -yearborn)} + {(currentyear -yearborn) / 4} ] - [(daysofyearthatpassed*) + (dayborn)] + [(daysofyearthatpassed*)+(currentday)]


daysofyearthatpassed* : depending on which month and if the year has 366 or 365 days, I calculated an amount that I just add to the day.



As you can see this isn't working.. So if you guys find a better way or can actually correct this, please don't be shy to do so.
11-11-2006 09:14 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Formula to calculate days lived? - by albert on 11-11-2006 at 09:14 PM
RE: Formula to calculate days lived? - by foaly on 11-11-2006 at 10:24 PM
RE: Formula to calculate days lived? - by qgroessl on 11-11-2006 at 10:25 PM
RE: Formula to calculate days lived? - by CookieRevised on 11-12-2006 at 12:37 AM
RE: Formula to calculate days lived? - by RaceProUK on 11-12-2006 at 03:44 PM
RE: Formula to calculate days lived? - by fluffy_lobster on 11-12-2006 at 08:18 PM
RE: RE: Formula to calculate days lived? - by rav0 on 11-13-2006 at 06:24 AM
RE: Formula to calculate days lived? - by RaceProUK on 11-12-2006 at 10:46 PM
RE: Formula to calculate days lived? - by Jarrod on 11-14-2006 at 10:58 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On