David Smith

David Smith

  • NA
  • 2k
  • 0

SQL date where clause

Sep 2 2012 3:34 AM
I need help with the datetime where clause, I am normally doing this in Linq, but now I want to do this where clause into a sql query. Review below. 

Basically I selecting records between plus or minus 60 days from current datetime now. I am using an access database for current project. I just need help with current where clause in green.



Select firstName, lastName, CreatedDateTime
FROM ExampleTable
Where  CreatedDateTime  >=  DateAdd(""d"",Now(),-60) AND CreatedDateTime   <= DateAdd(""d"",Now(),60)

Answers (7)