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.
Author |
Topic |
janetb
Yak Posting Veteran
71 Posts |
Posted - 2004-10-13 : 11:12:38
|
I'm trying my first reports - got a basic one and now I'm trying to try for what I really want. I can query the database for one parameter using a dataset. But, I'd like to set the default for another parameter to the current year. I've tried parameter=global!executionTime.getFullYear and some other variations but get errors.Any help? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-19 : 15:28:52
|
Use Now() with DatePart.Tara |
 |
|
janetb
Yak Posting Veteran
71 Posts |
Posted - 2004-10-19 : 15:50:57
|
Thanks Tara,I did find the following, which BOL suggests instead of now() so that I don't have to worry about retrieving the time.=datePart("yyyy",dateTime.Today()) |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-19 : 15:53:41
|
The time portion doesn't matter when you are just going to use DatePart anyway. Either way works though.Tara |
 |
|
|
|
|