Solved

MS SQL Report services: todays date, minus a day

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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