Solved

MS SQL Report services: todays date, minus a day

Posted on 2009-05-11
5
1,365 Views
Last Modified: 2012-05-06
Hello all. I need to

I am working with Microsoft SQL 2005 Report services and need to create a basic expression and have completely forgotten how to create todays date minus one day.

Thanks in advance!
0
Comment
Question by:tonypjones
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:SalmanZG
ID: 24356957
select DATEADD(D,-1, getdate())
0
 
LVL 1

Author Comment

by:tonypjones
ID: 24357039
I need to input this directly into the edit expression text box. I tried inputting select DATEADD(D,-1, getdate()) and replaced the "select" with a = but it did not like the "D".
0
 
LVL 3

Expert Comment

by:SalmanZG
ID: 24357211
Can you try this:
DateAdd(DateInterval.Day, -1, Today())
0
 
LVL 16

Accepted Solution

by:
Auric1983 earned 500 total points
ID: 24357239
You can also try this

=Today().AddDays(-1)

0
 
LVL 1

Author Closing Comment

by:tonypjones
ID: 31580244
That was it! I knew it as soon as I saw it. Thanks Auric1983
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question