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
 Development Tools
 Reporting Services Development
 Now Function

Author  Topic 

gavakie
Posting Yak Master

221 Posts

Posted - 2008-06-02 : 10:40:10
I saw a now function on a site but am confused by it, I need three different tables where one table = current year, one = current year-1 and then the last = current year -2, can I use the now function some how to set those tables = to that?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-02 : 10:44:25
YEAR(NOW())
YEAR(NOW()) - 1
YEAR(NOW()) - 2



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

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-02 : 10:46:01
Yup
You can use Year(Now()),Year(Now())-1 and Year(Now())-2 to achive this in filtering of data
Go to Top of Page
   

- Advertisement -