Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting birthday field

Status
Not open for further replies.

sap1958

Technical User
Oct 22, 2009
138
US
birthmonth char(2)
birthday char(2)
birthyear char(4)
sample data
08 09 1958
These three are text fields and I want to bring them together and show a formula to a numeric formula called @Age. How can I do this in a crystal formula. In the above example the age is 51
 
First you would need to convert to an date and then use another formula to calculate the age (I think the help file has one that works pretty good).

To convert the fields to a date. The date function is pretty friendly, so here is one possibility.

datevar Bdate;
Bdate := Date({birthmonth}&"/"&{birthday}&"/"&"{birthyear})

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top