how can i find age of user when enter date like "23/03/1982" then age should be display in textbox using sql query.
actualy i want to find age using server date. by sql query....
how to implement using sql query...
below is my query how can i implement this query to vb6.0 project...
- select DATEDIFF(YEAR,CONVERT(datetime,'23/03/1993',103),CONVERT(datetime,GETDATE(),103))
Textbox2 is for age.


Sachin SinghRank #66 · 26.2K reputationPosted Apr 7, 2021, 3:43 AM EDT
Kirtesh ShahRank #250 · 10K reputationPosted Apr 7, 2021, 3:06 PM EDT
Siddharth GajbhiyeRank #376 · 6.7K reputationPosted Apr 8, 2021, 12:31 AM EDT
Bhavesh VankarRank #1,147 · 1.6K reputationPosted Apr 8, 2021, 2:02 AM EDT
Kirtesh ShahRank #250 · 10K reputationPosted Apr 8, 2021, 2:58 AM EDT
Do you need Age in decimal or round age? Based on the requirement use query in code.
Secondly, after executing
you need to read Recordset(objRs ) . Fetch the output and set to Textbox2.
Bhavesh VankarRank #1,147 · 1.6K reputationPosted Apr 8, 2021, 3:07 AM EDT
Kirtesh ShahRank #250 · 10K reputationPosted Apr 8, 2021, 4:49 AM EDT
Bhavesh VankarRank #1,147 · 1.6K reputationPosted Apr 8, 2021, 4:56 AM EDT
Bhavesh VankarRank #1,147 · 1.6K reputationPosted Apr 8, 2021, 5:01 AM EDT
Kirtesh ShahRank #250 · 10K reputationPosted Apr 9, 2021, 3:08 AM EDT