Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2009
    Location
    New York
    Posts
    2

    Unanswered: Date (Month/Day) calculated from DOB

    First time posting, avid reader.

    I would like help with calculating a date based off a person's birthdate month/day, as a way to know when to order new documents on them.

    Example, 3 months prior to someone's birthdate on the day and 6 months after the person's birthdate on the day.

    Birthdate: 6/1/1927

    3 mo prior: 3/1/2009
    6 mo after: 12/1/2009

    I calculate the person's age with the following:

    Age: DateDiff("yyyy",[Birthdate],Date())-IIf(Format([Birthdate],"mmdd")>Format(Date(),"mmdd"),1,0)

    I tried using the DateAdd function: DateAdd("m",6,[Birthdate])

    Which works for Month and Day however not the year, because the result I'm looking for is when to order this year, when it calculates from the person's birth year.

    Do I have to separate the birthdate field into month,day and year and go from there?

  2. #2
    Join Date
    May 2009
    Posts
    258
    You can get their birthday for the current year as follows:
    Code:
    DateSerial(Year(Now), Month(Birthdate), Day(Birthdate))
    Regards,

    Ax
    Last edited by Ax238; 06-01-09 at 17:18.

  3. #3
    Join Date
    Jun 2009
    Location
    New York
    Posts
    2
    Thank you, its perfect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •