Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_GeneralGeneral Functions

Public Function GetAgeGroup (
vDOB As Variant,
Optional AsAtDate As Date = 0
) As Long

Get age group as specified in table lk_AgeGroup (which may be customised by the user). The table values are read once and then cached for the lifetime of the application. The makes the lookup very fast.
Returns an AgeGroup_ID from the table. -10 is the fixed 'Unknown' group.

vDOB as Variant

Either Null or the Date of Birth as a Date or String.

Optional AsAtDate as Date = 0

The optional date at which to calculate age. Defaults to today.

Call Template:

Dim i As Long
i = xf.Gen.GetAgeGroup(vDOB)
i = xf.Gen.GetAgeGroup(vDOB, AsAtDate)

See Also:

Example 1:

GetAgeGroup ("21 Sep 1970", #1 Jan 2014#) => 44
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd