-5

I need to calculate the average the following observed dates:

1/7/2010
15/7/2011
17/6/2012
3/7/2013

How can I do that in asp.net or any other language. If there is any formula to do that.

Enas Ali
  • 72
  • 1
  • 9

1 Answers1

-2

You need to convert it to Ticks (this will convert it to System.Int64) and then do the average of them all.

See the following answer: https://stackoverflow.com/a/16683441/643761

Community
  • 1
  • 1
Simcha Khabinsky
  • 1,970
  • 2
  • 19
  • 34
  • this work on dates in the same year .not different years . – Enas Ali Jun 03 '14 at 05:55
  • You are wrong. Read about ticks here: http://msdn.microsoft.com/en-us/library/system.datetime.ticks.aspx. `"The value of this property represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001, which represents DateTime.MinValue."` – Simcha Khabinsky Jun 03 '14 at 05:57
  • Thank you Simcha Khabinsky. I understand. – Enas Ali Jun 03 '14 at 06:03