Format Date Expression in SSRS

Posted on 2008-10-23
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
Question by:chrisryhal
  • 2
  • 2
LVL 12

Expert Comment

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

Author Comment

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

Accepted Solution

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

Author Comment

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 :)

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 2000:  Shrink LDF file 11 40
Sql Data via Excel--performance issues 2 55
SQL Agent Timeout 5 48
Caste datetime 2 52
This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Internet Business Fax to Email Made Easy - With  eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

19 Experts available now in Live!

Get 1:1 Help Now