Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Yesterday's Date

Posted on 2011-09-20
6
Medium Priority
?
3,582 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
LVL 9

Accepted Solution

by:
edlunad earned 1000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

715 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