As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tip of the Day:April 4"

From sasCommunity
Jump to: navigation, search
(New page: <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td style="background-color: #E1F7E5;border-color: #18AF1F;border-width: 1px;border-style: solid;" width="48%" valign="...)
 
m (scheduled Calculating Ages)
Line 1: Line 1:
 
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 
<tr>
 
<tr>
<td style="background-color: #E1F7E5;border-color: #18AF1F;border-width: 1px;border-style: solid;" width="48%" valign="top" align="center">
+
<td style="background-color: #E1F7E5;border-color: #18AF1F;border-width: 1px;border-style: solid;" width="48%" valign="top">
 
<h1 style="background-color: #18AF1F;color: #FFFFFF; padding:10px">
 
<h1 style="background-color: #18AF1F;color: #FFFFFF; padding:10px">
 
sasCommunity Tip of the Day
 
sasCommunity Tip of the Day
 
</h1><div style="padding:10px;">
 
</h1><div style="padding:10px;">
{{Tips:Placeholder}}
+
{{Tips:Calculating Ages}}
 
<div style="width:100%"><hr></div>
 
<div style="width:100%"><hr></div>
Feel free to [[Tips Talk:Placeholder|comment]] on this tip.
+
Feel free to [[Tips Talk:Calculating Ages|comment]] on this tip.
 
</div>
 
</div>
 
</td></tr>
 
</td></tr>

Revision as of 23:29, 3 April 2009

sasCommunity Tip of the Day

Because of leap years, it is not possible to accurately calculate a person's colloquial age on a particular date ("Age at Last Birthday") using just simple arithmetic operations. However, SAS date functions can be employed to get a correct result. The formula is

 age = floor((intck('month',birth,somedate) - (day(somedate) < day(birth))) / 12);



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip