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 2005 Forums
 Transact-SQL (2005)
 Help with Date Query

Author  Topic 

Ditrex
Starting Member

14 Posts

Posted - 2007-09-05 : 13:11:54
I have a table called documents that I need to get every person where their resume is older than 1 year. My table has the following fields:

UserID, LastName, FirstName, ResumeName, FileDate

*FileDate is a regular Date field using the default value of date and time.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-09-05 : 13:13:46
select * from documents
where filedate < dateadd(year, -1, current_timestamp)



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Ditrex
Starting Member

14 Posts

Posted - 2007-09-05 : 13:22:28
Sweet! Many thanks!
Go to Top of Page
   

- Advertisement -