Frasier13 Posted May 3, 2006 Share Posted May 3, 2006 Hi there I found the following calculation on a post on here and I have been trying to modify it so that I can calculate someones age based on the current date. This way their age will update each year in relation to the current date. However, out of 10 I would say i'm at level 2 or 3 so I don't fully understand it and it doesn't work when I modify it. Year(Date( 8; 1; Year(Get(CurrentDate)) + (GetAsNumber(Get(CurrentDate)) > GetAsNumber(Date( 8; 1; Year(Get(CurrentDate))) )) )) - Year(birthdate) - (GetAsNumber(Date( 8; 1; Year(Get(CurrentDate)) + (GetAsNumber(Get(CurrentDate)) > GetAsNumber(Date( 8; 1; Year(Get(CurrentDate))))) )) < GetAsNumber(Date(Month(birthdate); Day(birthdate); Year(Date( 8; 1; Year(Get(CurrentDate)) + (GetAsNumber(Get(CurrentDate)) > GetAsNumber(Date( 8; 1; Year(Get(CurrentDate))) ))) )))) I also tried a simple calculation: Todays date - birthdate But the result isn't quite working out. I have trawled through other posting but I can't seem to find anything that will help me. Thanks in advance. Link to comment Share on other sites More sharing options...
John Mark Osborne Posted May 3, 2006 Share Posted May 3, 2006 GetAsNumber(Year(Get(CurrentDate)) - Year(DOB) - Case(Get(CurrentDate) < Date(Month(DOB); Day(DOB); Year(Get(CurrentDate))); 1; 0)) Link to comment Share on other sites More sharing options...
Frasier13 Posted May 3, 2006 Author Share Posted May 3, 2006 You're a star!!! If you lived locally i'd buy you a pint the next time you're out in Manchester!!! Much appreciated. Link to comment Share on other sites More sharing options...
John Mark Osborne Posted May 3, 2006 Share Posted May 3, 2006 I just got back from the UK a few months ago and am visiting again probably at the end of the summer. So, I may have to take you up on the offer. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6568 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now