简体   繁体   中英

How to Display only the Datepart using Expression in SSRS?

I need to display only the Datepart(6/26/2000) in the report by neglecting Time in the Report in SSRS. already i'm fetching the that datetime from the Dataset output column Startdate

Expression Used :

=First(Fields!start_dte_display.Value, "Salesvalue")

SalesValue==>Dataset name

Output i'm getting from above Expression :

6/26/2000 12:00:00 AM

My expected Output :

6/26/2000 

Kindly Help me with the output!!

Try FORMAT:

=Format(First(Fields!start_dte_display.Value, "Salesvalue"), "MM/dd/yyyy")

Note: MM has to be in upper-case, mm will get you minutes!

You can use Text-box properties to set the date format as you want to show on the report. Just you need to right click on the text-box and choose Text Box Properties. In the Text Box Properties window you can choose Number > Date and date sample as 1/31/2000 and click on the Ok button.

Another simple way to set the Text Box Format = M/d/yyyy in properties window.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM