Microsoft KB Archive/124327

= How To Calculate a Person's Current Age =

Article ID: 124327

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.6a Standard Edition
 * Microsoft FoxPro 2.6a Standard Edition
 * Microsoft FoxPro 2.6a Professional Edition for Macintosh

-



This article was previously published under Q124327



SUMMARY
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.

Additional query words: VFoxWin FoxWin FoxDos FoxMac birthday birthdate

Keywords: kbcode KB124327

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.