Personal tools
You are here: Home Software Packages SAS SAS Tips Century Months

Century Months

— filed under: , ,

How to calculate a Century month or get the year and month from a Century Month.

A century month is the number of months from January 1900.

To calculate the century month using example variables dobyr (date of birth year) and dobmon (date of birth month):

dobcm = (dobyr-1900)*12 + dobmon;

To calculate the year and month from an existing century month:

dobyr = int((dobcm-1)/12) + 12;

dobmon =  dobcm - ((dobyr-1900)*12); 

Document Actions

Copyright ©2008, The Pennsylvania State University | Privacy and Legal Statements
Contact the Help Site Administrator | Last modified Aug 13, 2008 | Weblion Partner