Skip to main content
Participant
March 4, 2023
Question

Current year subtract DOB year in YYYY format

  • March 4, 2023
  • 2 replies
  • 950 views

Hi All,

 

Could you please help me out figuring out the javascript for arriving below-desired value.

 

As I give DOB year in YYYY Format in Text1 Field, then Text2 Field should display Current Year Minus DOB Year. If I give 1990 as DOB, then the result must be 33 Years.

 

Hope I have explained my problem and look forward to receiving the solution.

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
March 4, 2023

This is not how you calculate someone's age.