all groups > sql server reporting services > april 2005 >
You're in the

sql server reporting services

group:

Previous Business Day


Previous Business Day Jadranka
4/11/2005 6:04:02 PM
sql server reporting services: At the moment, I have a report that's using "=Today.AddDays(-1)" to return
yesterday's date in the date range parameters, but the client has now come
back and requested that they would prefer not to use weekends...e.g.: loading
the report on Monday should show last Friday's date.

Can this be done?

Thanks in advance.

Jadranka Krapic
DBA
Stargate Technologies
Re: Previous Business Day Dejan Lukovic
4/12/2005 12:00:00 AM
Hi,
Write simple custom code function
Function GetDate() As Date
Select Case Today.DayOfWeek
Case DayOfWeek.Monday
GetDate = Today.Date.AddDays(-3)
Case Else
GetDate = Today.Date.AddDays(-1)
End Select
End Function

And as parameter label and value put

=Code.GetDate()

Hope this help.

Best regards,
Dejan Lukovic

"Jadranka" <Jadranka@discussions.microsoft.com> escribió en el mensaje
news:03C3F8BF-1EC8-420B-81D9-106D94D608A1@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button