Re: Birthday calculations



On Sat, 25 Feb 2006 16:01:58 -0600, daddylonglegs
<daddylonglegs.23t2mm_1140905400.8523@xxxxxxxxxxxxxxxxxxxxx> wrote:


Hi JC,

What do you expect the formula to return on 1st March (in a non leap
year) for a 29th February birthdate?

btw you could simpify to

=DATE(YEAR(TODAY())+(TEXT(TODAY(),"mmdd")>TEXT(C3,"mmdd")),MONTH(C3),DAY(C3))-TODAY()

Hi Daddylonglegs,

That depends on what the convention is for those born on 29th Feb. Personally,
I would celebrate my birthday on 28th Feb in non leap years if I was born on
29th Feb thus keeping it in the same month so I would expect the formula to
return 364 days on 1st March but others may celebrate their birthday on 1st
March in which case 365 would be the answer.

I haven't tried your simplified formula yet but don't see how the
IF(TEXT(TODAY(),"mmdd")>TEXT(C3,"mmdd"),1,0) part can be simplified to
(TEXT(TODAY(),"mmdd")>TEXT(C3,"mmdd")). That doesn't make sense to me.
--

Cheers . . . JC
.



Relevant Pages

  • Re: Birthday Problem
    ... >>problem formulation is such that it really means something more ... >>the formula should be suitably modified for leap year. ... how many people it will take to find your birthday. ... anyone was born on 1-1 there is no telling how many people you would ...
    (comp.lang.cpp)
  • Re: what formula do i need to calculate a persons age
    ... There is a minor error in leap years for people born on 28th February - the ... Correction - the minor error arises if the person is born on 29th February i.e. ... I would subscribe to the birthday each year rather than one every 4 years, ...
    (microsoft.public.excel.misc)
  • Re: Judgement Day
    ... fabric was tart, upset, and opts next to the birthday. ... leap the systematic disciplinary compositions before Pilar does? ...
    (sci.crypt)
  • RE: Storing birthdate with year optional
    ... Note that in years which are not a leap year the expression would evaluate ... to True on 1 March for anyone with a birthday on 29 February. ... Optional varDateAt As Variant) As Boolean ... year toy could list all employees whose birthday is today in a query along ...
    (microsoft.public.access.gettingstarted)
  • Re: Age Calculation
    ... the issue I'm having is related to leap day and me taking ... the current year and concatenating it to a persons leap year birthday ... >> Update statement. ... >> Is there another way of taking a datetime field and calculate age in a SQL ...
    (microsoft.public.sqlserver.dts)