I have the date of birth of a person and want to calculate the days until his/her next birthday. How to do this in a way to deal with leapyears and other "odd" things?
+1
A:
I found that using WolframAlpha for calculating the days is the most "simple" way to do it. Use the following code:
REGEXEXTRACT(JOIN("";ImportXML(JOIN("";"http://www.wolframalpha.com/input/?i=birthday+";YEAR(A2);"-";MONTH(A2);"-";DAY(A2);"&asynchronous=false&equal=Submit"); "//script")); "(\d+) days until next")
Where A2
is the cell with the birthday of the person.
Martin
2010-08-26 13:53:18
I have been using excel so far to just store a few numbers and strings, with no exposure to such techniques (like the one you just suggested) so far. Could you explain how to actually 'run' this?
Rahul
2010-08-26 13:59:03