Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
PhiL56
Starting Member
2 Posts |
Posted - 2009-12-14 : 11:04:25
|
| I have a date in a table which is a users date of birth.Basically I want to check if they are under 21 according to todays date.Thank you for any help. |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-12-14 : 11:20:04
|
| where yourdate < dateadd(yy,-21,getdate()) |
 |
|
|
PhiL56
Starting Member
2 Posts |
Posted - 2009-12-14 : 11:29:05
|
| Works Great thank you very much!! |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-12-15 : 04:55:38
|
| Are you suggesting < 21's are easy? |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-12-15 : 07:25:42
|
/moves Brett up the hate list another notch. http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|