sql statement for age

Results 1 to 2 of 2

Thread: sql statement for age

  1. #1
    Join Date
    Dec 1969

    Default sql statement for age

    If there is a field with date of birth and you want to create a report with age groups - how do you use a sql statement to get the age from the date of birth. I know you need to subtract date of birth from todays date but what is the sql correct statement for this.<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: sql statement for age

    I think you want something like this...<BR><BR>rs.Open "SELECT date() - BIRTHDATE AS AGE_IN_DAYS FROM TABLENAME", cn, adOpenKeyset, adLockOptimistic, adCmdText

Posting Permissions

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