Solved

Format Date Expression in SSRS

Posted on 2008-10-23
4
1,434 Views
Last Modified: 2012-06-27
I need to be able to create an expression that takes today's date =FormatDateTime(Today()) and format it like 23-OCT-08 minus 1

So the value would actually be 22-OCT-08
0
Comment
Question by:chrisryhal
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:jgv
ID: 22787169
This should do it
=Format(Date.Today.AddDays(-1), "dd-MMM-yy")
0
 
LVL 2

Author Comment

by:chrisryhal
ID: 22787762
says that AddDays is an unrecognized identifier
0
 
LVL 12

Accepted Solution

by:
jgv earned 500 total points
ID: 22787814
SSRS does not recognize the method in the expression window but it will work when you run the report
0
 
LVL 2

Author Comment

by:chrisryhal
ID: 22787870
Actually, I got it to work after messing with what you originally gave me:

=Format(Today().AddDays(-1), "dd-MMM-yy")

Thanks for the tip and the crutch to get me here :)
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

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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