How to display yesterdays date in SSRS expression
Asked Answered
B

2

7

In one of the column name, I need to display yesterday's date like - September 4,2014

I used DateAdd("d",-1,Today()) function to display,but it is displaying like - 9/4/2014 12:00:00 AM.

How can i get the above format like - monthname,dd,YYYY ?

Blockbusting answered 5/9, 2014 at 17:6 Comment(0)
S
13

Use .. =format(dateadd("d", -1, today()), "MMMM dd,yyyy")

Sidero answered 5/9, 2014 at 17:10 Comment(2)
IS there any way ,i can make Month name Caps in the above expression?Blockbusting
use UCase function .. =UCase(format(dateadd("d", -1, today()), "MMMM,dd,yyyy"))Sidero
H
1

If you want add dynamic date or yesterday date in email body using ssrs tool SQL Server 2017, please fellow these steps:

Step 1>

enter image description here

Upload rdl file .

Step 2> Right click on file

enter image description here

Then click manage

enter image description here

Step 3> In Left menu click Subscription

enter image description here

Step 4> Click New Subscription

enter image description here

You will see this window

enter image description here

Then choose data-driven subscription

enter image description here

Then click edit dataset

enter image description here

Then you will get below window

enter image description here

From this select custom source you will get below window

enter image description here

after filling all type query like you want yesterday date then type below query:

enter image description here

Then click Validate Query AND APPLY

IN SUBJECT TAKE VALUE FROM DATABASE AND SEND MAIL

Heyday answered 20/12, 2018 at 6:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.