March 31, 2011 at 11:39 am
Anybody know of an efficient way of adding the current date to the end of a file name when publishing reports in SSRS 2005. We are currently using "@Timestamp" which produces an "ugly" version of the current date. We would really like to see that date displayed in the filename in the following format:
filename_2011-03-31.ext (.xls or .csv)
Any help would be greatly appreciated...
March 31, 2011 at 12:10 pm
Can you try this?
SELECT 'filename_' + REPLACE(CONVERT(NVARCHAR(20), GETDATE(), 102), '.', '-')
Regards,
Shaiju CK
_____________________________________________
One ounce of practice is more important than tonnes of dreams
March 31, 2011 at 12:19 pm
So when I am ready to "publish" the report created in SSRS and I am choosing the option to Notify by Report Server File Share I am asked for a file name.
We have been entering the following:
filename@Timestamp
Where exactly would the code you've given be entered in that instance?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply