Solved

Format Date Expression in SSRS

Posted on 2008-10-23
4
1,433 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
In this article I will describe the Copy Database Wizard 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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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