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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 datediff

Author  Topic 

PeterG
Posting Yak Master

156 Posts

Posted - 2001-11-19 : 16:15:56
Hi guys, my brain just doesn't work today (Monday blues, you know) and I'm trying to figure out how to use the datediff function to get records within the past 6 months. I have this table :
companyNumber cycleDate
1001 04/05/2001
1001 05/05/2001
1001 06/05/2001
1001 07/05/2001
1001 11/07/2001

When I run my select query, the recordset should include all records except the first 2 as they are not within the past 6 months.

Thanks for your help.

   

- Advertisement -