Solved

Yesterday's Date

Posted on 2011-09-20
6
2,505 Views
Last Modified: 2012-05-12
Hi,
I am using an expression to show today's date but would like to show yesterday's date instead.  I am using a Report Builder 3.0 (SSRS) and trying to create a prameter to create an expression.  Here is what i have now to show today's date :
=Now()
but would like to show yesterday's date.  thanks
0
Comment
Question by:karinos57
  • 3
  • 2
6 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
please try:

now()-1
0
 
LVL 9

Expert Comment

by:edlunad
Comment Utility
Try this...

=DateAdd("d",-1,Now())
0
 

Author Comment

by:karinos57
Comment Utility
edlunad,
this is works only when i delete the time from the date box. In the date box it shows like this:
09/19/2011 11:39:68 AM

so if i only delete the time in here then it will work.  thanks
see attached.
Doc1.docx
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 9

Accepted Solution

by:
edlunad earned 250 total points
Comment Utility
If you only want to display the Date and not the time, you should calculate the value using Today() not Now()

=DateAdd("d",-1,Today())
0
 
LVL 9

Expert Comment

by:edlunad
Comment Utility
If still that doesnt bring you just the Date, you can format it like this...

=FormatDateTime(DateAdd("d",-1,Today()),DateFormat.ShortDate)
0
 

Author Closing Comment

by:karinos57
Comment Utility
thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

772 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

14 Experts available now in Live!

Get 1:1 Help Now