Solved

MS SQL Report services: todays date, minus a day

Posted on 2009-05-11
5
1,361 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
  • 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

3 Use Cases for Connected Systems

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

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: In a previous article (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html) I announced that I would writ…
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

810 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