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 |
|
csphard
Posting Yak Master
113 Posts |
Posted - 2002-02-21 : 14:26:31
|
| Hi the following sql statement will give me a month and year. But how do i change that to look for 01 2002 thru 02 2002select * from due_evals where datepart(yyyy,ann_due_date) = 2002and datepart(mm,ann_due_date) = 01 |
|
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2002-02-21 : 14:40:19
|
| select * from due_evals where datepart(yyyy,ann_due_date) = 2002and datepart(mm,ann_due_date) in (1,2) |
 |
|
|
csphard
Posting Yak Master
113 Posts |
Posted - 2002-02-21 : 14:43:24
|
| that will work however what if the dates are something like 01 1997 thru 02 2002. |
 |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2002-02-21 : 14:46:29
|
| Why noth useselect * from due_evalswhere ann_due_date between '1/1/1997' and '2/28/2002'-Chad |
 |
|
|
csphard
Posting Yak Master
113 Posts |
Posted - 2002-02-21 : 16:32:27
|
| In my app they only want the user to input mm/yyyy not mm/dd/yyyy |
 |
|
|
|
|
|