Solved

MS SQL Report services: todays date, minus a day

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
Have you ever had to extract data from a Microsoft SQL Server database and export it to an Excel file, but did not want to use a DTS package? The concept in this article is not new, but it is the answer and will also work on 64-bit SQL boxes.   …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now