Let me preface this by saying that I'm an Access developer who is in the process of learning SQl Server, and I'm in desperate need of having a single question answered.How do you reference the current system date and time in a query? My problem is this- I need to select a news article if the current date lies between the dates specified in two fields. This is acheived easily in Access by using the built-in NOW() function, as in the example below:SELECT News.Headline, News.Article, News.DebutDate, News.ExpiryDate, News.LinkText, News.LinkURLFROM NewsWHERE (((News.DebutDate)<=Now()) AND ((News.ExpiryDate)>=Now()));
I have tried a number of things using GETDATE(), but none seem to work. How can I make this query work on SQL server?