English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i.e if i was working out how many days ago 20/06/2001 was. i need it to fit into a spread sheet for multiple amounts

2007-04-20 22:23:16 · 6 answers · asked by Anonymous in Science & Mathematics Mathematics

6 answers

I don't know about other spreadsheet programs, but in MS Excel, you can do "date math". Simply put a formula in the desired cell "=date1 - date2". You will probably have to change the formatting to "general number" as I think that it will default to some sort of date formatting. Hope this helps!

2007-04-20 22:32:20 · answer #1 · answered by Anonymous · 0 0

There is no general algorithm as you have to lookup the length of each month.

Given date 1 as d1,m1,y1 and date 2 as d2,m2,y2 the algorithm would be:

Work out number of complete years and multiply this by 365
Add the number of leap years. This has to take into account of the first year if m1<2 and the last year if m2>2.

Work out the number of days in whole months between m1 and m2. This involves a lookup table based on 1st Jan = 1, 1st Feb - 32, 1st Mar = 60 etc (leap years were taken care of above) and depends on the value of m1

Finally add the difference between the days - taking into account the length of a month e.g. 10th April = 41st March

2007-04-22 15:00:34 · answer #2 · answered by welcome news 6 · 0 0

calculate leap years between two dates
take a starting date such as 1.1.1900
calculate dates till starting and ending dates.
Subtract them. The result will be the answer.

2007-04-21 05:41:23 · answer #3 · answered by iyiogrenci 6 · 0 0

Buy a Calendar

2007-04-21 05:27:21 · answer #4 · answered by ashymojo 3 · 0 0

These are few sites that MAY help - It depends what you are actually needing to to do...{Perhaps the FIRST one is best...}

http://office.microsoft.com/en-us/access/HP010984861033.aspx

http://www.starlightccd.com/walter/bytebook/javascript/jdcalc.htm

http://www.nr.com/julian.html

http://emr.cs.iit.edu/home/reingold/calendar-book/Calendrica.html

2007-04-21 05:54:22 · answer #5 · answered by Rod Mac 5 · 0 0

Start counting

2007-04-21 06:26:28 · answer #6 · answered by Aswin Kumar 2 · 0 0

fedest.com, questions and answers