Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculating age from DOB and interview date

    Hello,

    I have date variables in several formats: patients DOB in format 01/01/70, and interview date in format 01Jan1970.

    I was hoping to get some recommendations in options/packages for using these data to calculate age at time of interview.

    Any help would be very much appreciated, thank you.

  • #2
    The term format here is ambiguous without a proper data example such as we ask you to give. Please follow https://www.statalist.org/forums/help#stata

    It could mean anything from string variables that are literally as you state to numeric date variables with a display format.

    Once you have numeric daily date variables, everything is easy given functionality fairly recently added and documented under

    Code:
    help datetime functions 
    As a user of Stata 17 you should not need to install any community-contributed packages.

    Comment

    Working...
    X