Solved

Yesterday's Date

Posted on 2011-09-20
6
2,922 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 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 36567409
please try:

now()-1
0
 
LVL 9

Expert Comment

by:edlunad
ID: 36567453
Try this...

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

Author Comment

by:karinos57
ID: 36567882
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 9

Accepted Solution

by:
edlunad earned 250 total points
ID: 36568562
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
ID: 36568578
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
ID: 36568618
thanks
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

696 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