Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7887849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:41:13+00:00 2026-06-03T05:41:13+00:00

I have read some threads about this already but I don’t understand the code,

  • 0

I have read some threads about this already but I don’t understand the code, so i’ll ask a question that works specifically with the data I already have. My database has a user’s date of birth in the following format:
yyyy-mm-dd

This field is pulled from the database using a php service, then populating a datagrid. I’m using an ItemRenderer to customise the columns. I would like to take my DOB which is accessed by {data.dob} and then work out the age in years. Do I have to split my result into days/months/years first, then calculate? or can I just do it from the DOB I get back? Also I’ve seen examples that use the date 01/01/1970 but I don’t understand how that works.

Any correct answer is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:41:15+00:00Added an answer on June 3, 2026 at 5:41 am

    You should be able to use date Arithmetic. Just subtract the current date from the data.dob. I would use this DateUtils class.

    Here is a sample. Just use choose DateDiff, then choose the birth date as your first date and today’s date as the second date. Get the answer in years, and you’ll have the person’s age.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read some threads regarding this and I did already take steps to
Greetings, I've read some threads about this topic, but actually I was unable to
I have read some posts about this topic and the answers are comet, reverse
I have read some articles on POCO in the enttity framework but still don't
I have read through some tutorials about javascript prototypal inheritance patterns but I am
I have read some threads about how to imitate the iTunes source list style.
Hmmm... I have read about this issue on various other threads here on stackoverflow
I've checked other threads about this subject, but nothing really answers my exact question.
I have read some posts on here about not mixing parameters when passing into
I have just switched from svn to mercurial and have read some tutorials about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.