Exact age (1 Viewer)

kolait

Registered User.
Local time
Today, 08:50
Joined
Oct 11, 2019
Messages
60
hi
In the field "A" I have a birthday. I want to find out the exact age of the year, month and day.Please help me
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:20
Joined
Oct 29, 2018
Messages
21,453
Hi. You'll probably need a custom function for that. You could try this one.
 
Last edited:

kolait

Registered User.
Local time
Today, 08:50
Joined
Oct 11, 2019
Messages
60
Thanks for helping me...
I don't know how to make a proprietary function. Will you help me? thank you
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:20
Joined
Feb 19, 2002
Messages
43,223
Here's a sample database that I've posted multiple times.
 

Attachments

  • UsefulDateFunctions180618.zip
    231 KB · Views: 94

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:20
Joined
Oct 29, 2018
Messages
21,453
Thanks for helping me...
I don't know how to make a proprietary function. Will you help me? thank you

Hi. You may have missed it. I added a link in my earlier post.
 

kolait

Registered User.
Local time
Today, 08:50
Joined
Oct 11, 2019
Messages
60

Attachments

  • 2019-10-17_1-42-38.png
    2019-10-17_1-42-38.png
    20.2 KB · Views: 99

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:20
Joined
Oct 29, 2018
Messages
21,453
I wrote right but it didn't work out. Thank you for taking the time for me

Hi. Since you already have a working solution from Pat, I guess we don't have to pursue this anymore. However, saying "it didn't work" wouldn't be enough information for us to help you troubleshoot the problem, if you had wanted it fixed. So, for future reference, let us know exactly how the suggestion didn't work and provide any error message you may have received. Good luck with your project.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:20
Joined
Feb 19, 2002
Messages
43,223
If you choose to use the code in my sample (or whatever code you want to use), you can put it into your own function and have the function return the text string you want. Call the function from the query.
 

kolait

Registered User.
Local time
Today, 08:50
Joined
Oct 11, 2019
Messages
60
If you choose to use the code in my sample (or whatever code you want to use), you can put it into your own function and have the function return the text string you want. Call the function from the query.

Thank you for taking the time for me. I want to write age here
 

Attachments

  • 5.png
    5.png
    27.4 KB · Views: 112

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:20
Joined
Feb 19, 2002
Messages
43,223
The query would be something like:
Select fld1, fld2, GetAge(Birthdate) As TextAge, fld4 from yourtable;

Create the GetAge() function to take in the birthdate and return the text string you want. All the pieces are in the code I provided but you'll need to put it together because I'm off to play bridge for a few days.
 

Users who are viewing this thread

Top Bottom