July 5, 2005 at 1:47 am
To put today's date in an expression you type 'datetime.today'. How do you express this date last year? There is documentation to suggest that datetime.addyears(-1) might work but it doesn't, at least not immediately. Any ideas?
July 5, 2005 at 11:37 am
datetime.today.addyears(-1)
July 6, 2005 at 1:56 am
brilliant! Now tell me where did you find that out, in BOL? where is the full list of such properties and methods?
thanks.
July 6, 2005 at 11:06 am
Actually I just hacked it, meaning I just tried it with that syntax and it worked. LOL.
Now I did a search and found:
http://msdn2.microsoft.com/library/991wfdee(en-us,vs.80).aspx
http://msdn2.microsoft.com/library/cw8hzdwz(en-us,vs.80).aspx
This is actually .NET code, not specifically "Reporting Services" code.
July 7, 2005 at 1:52 am
you'd think this sort of thing would be documented somewhere obvious, but... anyway thanks.
July 7, 2005 at 3:50 am
As Greg mentioned the DateTime class (actually System.DateTime) is part of the .NET framework, and is documented here:
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply