Click here to Skip to main content
12,246,406 members (41,155 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
Hello sir,
In my project a table having a column BirthDate.I want to show only the records whose age<=58.I have not age column.
plz send the code with datediff().
Plz,plz .............
So Urgent.
Posted 6-Dec-12 2:03am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hi

select DATEDIFF(YEAR,DataofBirth,GETDATE())from where DATEDIFF(YEAR,DataofBirth,GETDATE())<=58.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Select [fields] from where Datediff(YEAR,DataofBirth,Getdate())<=58


You can then bind this to your UI control (like grid)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100