Microsoft small business knowledge base

Article ID: 124327 - Last Review: February 24, 2014 - Revision: 2.1

This article was previously published under Q124327
This article has been archived. It is offered "as is" and will no longer be updated.


To calculate a person's current age, enter the following commands in the Command window:
   m.DOB = {12/03/62}
   m.age = ROUND(((DATE() - m.DOB) / 365.25),0)
   ? m.age
NOTES: The value 365.25 accounts for leap years, and the question mark tells FoxPro to print the age to the screen. You may need to minimize open windows to see the printed value.

  • Microsoft Visual FoxPro 3.0 Standard Edition
  • Microsoft FoxPro 2.6a Standard Edition
  • Microsoft FoxPro 2.6a Professional Edition for Macintosh
kbnosurvey kbarchive kbcode KB124327
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support