Solved

Yesterday's Date

Posted on 2011-09-20
6
2,805 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Activity Monitor detail 2 28
Shrink multiple databases at once 4 27
SQL View / Qtry 3 12
MS SQL + date 6 12
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

839 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